refactor(providers): define typed usage contract

This commit is contained in:
chengyongru authored and chengyongru committed 2026-08-25 01:04:25 +08:00
1 parent 89c94d8744
commit 9895c23cb5
84 files changed
+1643 -726

No files matched your search

+3
View File
@@ -124,7 +124,10 @@ class FallbackProvider(LLMProvider):
fallback_model_observer: FallbackModelObserver | None = None,
primary_context_window_tokens: int | None = None,
):
primary_generation = primary.generation
self._primary = primary
super().__init__(provider_name=primary.provider_name)
self._primary.generation = primary_generation
self._fallback_presets = list(fallback_presets)
self._provider_factory = provider_factory
self._fallback_model_observer = fallback_model_observer