refactor: move model definitions into providers and extract resolve module
- 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:
parent
dc6a75f5c4
commit
d0dac5b1bf
13 changed files with 432 additions and 390 deletions
|
|
@ -13,7 +13,7 @@ import typer
|
|||
from bulkgen.builder import BuildEvent, BuildResult, run_build
|
||||
from bulkgen.config import ProjectConfig, load_config
|
||||
from bulkgen.graph import build_graph, get_build_order
|
||||
from bulkgen.providers.models import ALL_MODELS
|
||||
from bulkgen.providers.registry import get_all_models
|
||||
|
||||
app = typer.Typer(name="bulkgen", help="AI artifact build tool.")
|
||||
|
||||
|
|
@ -182,9 +182,10 @@ def graph() -> None:
|
|||
@app.command()
|
||||
def models() -> None:
|
||||
"""List available models and their capabilities."""
|
||||
name_width = max(len(m.name) for m in ALL_MODELS)
|
||||
provider_width = max(len(m.provider) for m in ALL_MODELS)
|
||||
type_width = max(len(m.type) for m in ALL_MODELS)
|
||||
all_models = get_all_models()
|
||||
name_width = max(len(m.name) for m in all_models)
|
||||
provider_width = max(len(m.provider) for m in all_models)
|
||||
type_width = max(len(m.type) for m in all_models)
|
||||
|
||||
header_name = "Model".ljust(name_width)
|
||||
header_provider = "Provider".ljust(provider_width)
|
||||
|
|
@ -210,7 +211,7 @@ def models() -> None:
|
|||
+ "─" * len(header_caps)
|
||||
)
|
||||
|
||||
for model in ALL_MODELS:
|
||||
for model in all_models:
|
||||
name_col = model.name.ljust(name_width)
|
||||
provider_col = model.provider.ljust(provider_width)
|
||||
type_col = model.type.ljust(type_width)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue