feat(models): register 7 new provider models#264
Merged
Kamilbenkirane merged 4 commits intomainfrom Apr 22, 2026
Merged
Conversation
Add gpt-image-2 (OpenAI), mistral-medium-3-5 (Mistral), command-a-translate-08-2025 and command-r-plus-08-2024 (Cohere), claude-opus-4-7 (Anthropic), gemini-3.1-flash-tts-preview (Google TTS), and veo-3.1-lite-generate-preview (Google Veo).
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
Extend ImageParameter enum with BACKGROUND, MODERATION, OUTPUT_COMPRESSION. Add NumImagesMapper base + wire 5 new modality-layer wrappers (num_images, output_format, background, moderation, output_compression) for OpenAI images. Register constraints on gpt-image-1, gpt-image-1-mini, gpt-image-1.5, gpt-image-2 — transparent background limited to the gpt-image-1 generation per OpenAI docs.
…E consolidation
- claude-opus-4-7: swap THINKING_BUDGET (Range) for THINKING_LEVEL (Choice)
to route to Anthropic's adaptive-thinking effort preset instead of the
extended-thinking budget_tokens shape the model rejects. Add a new
ThinkingLevelMapper base class that emits {type: "adaptive", effort: ...}
and a modality wrapper in the Anthropic provider registry.
- veo-3.1-lite-generate-preview: add REFERENCE_IMAGES constraint (max 3,
JPEG/PNG/WebP) to match the -generate-preview sibling.
- OpenAI images: use existing ImageParameter.SAFETY_TOLERANCE instead of
introducing a duplicate MODERATION enum value (BFL already uses it with
an integer range; widen its TypedDict type to int | str so the OpenAI
'auto'/'low' string tier fits). Rename the modality wrapper to
SafetyToleranceMapper.
- gpt-image-1.5: restore transparent background option; docs confirm only
gpt-image-2 dropped transparent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds 7 new models to the modality registries:
gpt-image-2mistral-medium-3-5command-a-translate-08-2025command-r-plus-08-2024claude-opus-4-7gemini-3.1-flash-tts-previewveo-3.1-lite-generate-previewAll additions are pure data — appending to existing
MODELSlists. No new files, no aggregator edits, no provider runtime changes.Not included:
cohere-transcribe-03-2026— requires mainlineOperation.TRANSCRIBE, currently only present in thestt-supportworktree. Will land alongside that merge.command-a-03-2025— already registered.Test plan
make ci— 594 passed, 82.30% coverage, all lint/type/security checks greenget_model(id, provider)returns the expected entry