feat: add OpenAI as provider for text and image generation
- Add openai_text.py: text generation via OpenAI chat completions API (gpt-4o, gpt-4o-mini, gpt-4.1, gpt-4.1-mini, gpt-4.1-nano, o3-mini) - Add openai_image.py: image generation via OpenAI images API (gpt-image-1 with reference image support, dall-e-3, dall-e-2) - Refactor builder provider dispatch from TargetType to model-name index to support multiple providers per target type - Fix circular import between config.py and providers/__init__.py using TYPE_CHECKING guard - Fix stale default model assertions in tests - Add openai>=1.0.0 dependency
This commit is contained in:
parent
d0dac5b1bf
commit
870023865d
9 changed files with 571 additions and 58 deletions
|
|
@ -22,8 +22,8 @@ class TestLoadConfig:
|
|||
|
||||
assert "out.txt" in config.targets
|
||||
assert config.targets["out.txt"].prompt == "hello"
|
||||
assert config.defaults.text_model == "mistral-large-latest"
|
||||
assert config.defaults.image_model == "flux-pro-1.1"
|
||||
assert config.defaults.text_model == "pixtral-large-latest"
|
||||
assert config.defaults.image_model == "flux-2-pro"
|
||||
|
||||
def test_full_config_with_all_fields(self, project_dir: Path) -> None:
|
||||
raw = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue