refactor: move model definitions into providers and extract resolve module
Some checks failed
Continuous Integration / Build Package (push) Successful in 30s
Continuous Integration / Lint, Check & Test (push) Failing after 38s

- Rename ImageProvider to BlackForestProvider, TextProvider to MistralProvider
- Add get_provided_models() abstract method to Provider base class
- Move model lists from models.py into each provider's get_provided_models()
- Add providers/registry.py to aggregate models from all providers
- Extract infer_required_capabilities and resolve_model from config.py to resolve.py
- Update tests to use new names and import paths
This commit is contained in:
Konstantin Fickel 2026-02-15 11:03:57 +01:00
parent dc6a75f5c4
commit d0dac5b1bf
Signed by: kfickel
GPG key ID: A793722F9933C1A5
13 changed files with 432 additions and 390 deletions

View file

@ -27,6 +27,11 @@ WriteConfig = Callable[[dict[str, object]], ProjectConfig]
class FakeProvider(Provider):
"""A provider that writes a marker file instead of calling an API."""
@staticmethod
@override
def get_provided_models() -> list[ModelInfo]:
return []
@override
async def generate(
self,
@ -43,6 +48,11 @@ class FakeProvider(Provider):
class FailingProvider(Provider):
"""A provider that always raises."""
@staticmethod
@override
def get_provided_models() -> list[ModelInfo]:
return []
@override
async def generate(
self,