feat: support gpt-5.4 and gemini-3.1 model families#22
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for two new model families across the type registry, model factory, orchestrator graph routing, and frontend selector: the Azure OpenAI gpt-5.4-mini/gpt-5.4-nano models and the Google Vertex AI gemini-3.1-flash-lite-preview model. The existing gemini-3-pro-preview entry in _MODEL_METADATA is also renamed to gemini-3.1-pro-preview and its supported thinking levels expanded from low/high to low/medium/high, mirrored in the frontend's getAvailableThinkingLevels filter.
Changes:
- Register
gpt-5.4-mini,gpt-5.4-nano, andgemini-3.1-flash-lite-previewin theModelTypeliteral,_MODEL_METADATA, and the per-provider config dicts inmodel_factory.py; route them increate_model()for Gemini. - Wire the new models into orchestrator response-format/strategy routing and Gemini built-in tool injection in
graph_factory.py. - Add the new options to the frontend
MODEL_OPTIONSlist and update the Gemini 3.1 Pro thinking-level filter to includemedium.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/agent-common/agent_common/models/base.py | Adds three new entries to the ModelType literal. |
| packages/agent-common/agent_common/core/model_factory.py | Adds metadata + provider configs for the new models; renames Gemini Pro key to 3.1 and updates thinking levels; routes flash-lite through the Gemini branch. |
| packages/orchestrator-agent/app/core/graph_factory.py | Includes the new GPT-5.4 models in the ToolStrategy branch and the new Gemini in the Gemini response/tools branches. |
| packages/console-frontend/src/config/models.ts | Adds the three new models to MODEL_OPTIONS and broadens Gemini 3.1 Pro's allowed thinking levels to include medium. |
Comments suppressed due to low confidence (1)
packages/agent-common/agent_common/core/model_factory.py:143
- The new
gemini-3.1-flash-lite-previewentry is missing thelocation,display_name, anddescriptionfields that the other Gemini entries (gemini-3.1-pro-preview,gemini-3-flash-preview) define. Two concrete consequences:
- In
create_model()at line 470,gcp_location = model_config.get("location") or os.getenv("GCP_LOCATION", "europe-west4")— without"location": "global"this model will be routed to the env-configured region (oreurope-west4) rather thangloballike its siblings. If that is intentional, it should be made explicit; otherwise the omission will cause routing differences from the other Gemini 3.x models. _get_models_prompt_text()(lines 353-358) will emit- gemini-3.1-flash-lite-preview (gemini-3.1-flash-lite-preview):with an empty description, so the agent-creator prompt won't describe this model.
Please add the missing keys consistent with the other Gemini entries (or explicitly document why location is omitted).
"gemini-3.1-flash-lite-preview": {
"model_id": "gemini-3.1-flash-lite-preview",
"input_modes": ["text", "image", "audio", "video", "file"],
"backend": "google",
},
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "gpt-5.4-mini": { | ||
| "api_version": "2025-01-01-preview", | ||
| "deployment": "gpt-5.4-mini", | ||
| "model_name": "gpt-5.4-mini", | ||
| "input_modes": ["text", "image"], | ||
| "backend": "azure_openai", | ||
| }, | ||
| "gpt-5.4-nano": { | ||
| "api_version": "2025-01-01-preview", | ||
| "deployment": "gpt-5.4-nano", | ||
| "model_name": "gpt-5.4-nano", | ||
| "input_modes": ["text", "image"], | ||
| "backend": "azure_openai", | ||
| }, |
| "gemini-3.1-flash-lite-preview": { | ||
| "label": "Gemini 3.1 Flash Lite Preview", | ||
| "provider": "Google Vertex AI", | ||
| "supports_thinking": True, | ||
| "thinking_levels": ["low", "high"], | ||
| }, |
| "gpt-5.4-mini", | ||
| "gpt-5.4-nano", | ||
| "claude-sonnet-4.5", | ||
| "claude-sonnet-4.6", | ||
| "claude-haiku-4-5", | ||
| "gemini-3.1-pro-preview", | ||
| "gemini-3.1-flash-lite-preview", |
No description provided.