mirror of
https://github.com/usestrix/strix.git
synced 2026-08-22 11:02:08 +02:00
Three modules touched in Phase 0 surfaced latent issues:
- llm/llm.py:_extract_thinking — choices[0].message can be None or a
TextChoices variant without thinking_blocks under the new stubs.
Narrow via getattr+Any; restructure return through the else block
so try/except/else is ruff-clean (TRY300).
- llm/__init__.py:litellm._logging._disable_debugging is now untyped;
suppress with explicit type:ignore.
- tools/notes/notes_actions.py:append_note_content — drop dead-code
isinstance check (delta is typed str at the boundary), and cast the
update_note return through a typed local in the try/else flow.
Plus per-file PLC0415 ignore for two modules whose lazy imports exist
to break the circular dependency on strix.telemetry. Pre-commit
auto-formatter strips inline #noqa comments, so the suppress lives in
pyproject.toml until the dep graph is refactored.
No behavior change. 165/165 tests pass.
20 lines
447 B
Python
20 lines
447 B
Python
import logging
|
|
import warnings
|
|
|
|
import litellm
|
|
|
|
from .config import LLMConfig
|
|
from .llm import LLM, LLMRequestFailedError
|
|
|
|
|
|
__all__ = [
|
|
"LLM",
|
|
"LLMConfig",
|
|
"LLMRequestFailedError",
|
|
]
|
|
|
|
litellm._logging._disable_debugging() # type: ignore[no-untyped-call]
|
|
logging.getLogger("asyncio").setLevel(logging.CRITICAL)
|
|
logging.getLogger("asyncio").propagate = False
|
|
warnings.filterwarnings("ignore", category=RuntimeWarning, module="asyncio")
|