[feat] migrate to latest provider models and remove deprecated ones#7681
[feat] migrate to latest provider models and remove deprecated ones#7681chiruu12 wants to merge 8 commits intoagno-agi:mainfrom
Conversation
- Update default model from gemini-3-flash-preview to gemini-flash-latest - Prepare for deprecation of gemini-2.0-flash-001 on June 1st, 2026 - Verify mimetypes import is present for file operations
- Replace llama-v3p1-405b-instruct with gpt-oss-120b - The old model is no longer available as serverless on Fireworks - Use new preferred model for better compatibility
- Replace grok-beta with grok-4-1-fast-non-reasoning-latest - Use latest production-ready Grok model - Provides better performance and stability
- Replace gpt-4o with gpt-5.4-mini - More cost-effective model with better performance - Recommended as default for new OpenRouter users
- Replace kimi-k2-thinking with kimi-k2.5 - Prepare for deprecation of K2 models on May 25, 2026 - New model offers better pricing (cache hit: $0.10 vs $0.15) - Maintains same 262k token context window - Improved performance and stability
- OpenAI: Replace gpt-4o with gpt-5.4-mini for better price-to-performance - Together: Replace Mixtral-8x7B with MiniMax-M2.7 - Significantly lower cost: $0.30 input ($0.06 cached) vs $0.60 for Mixtral - Better performance and modern architecture - Both models maintain compatibility while reducing operational costs
PR TriageA few things to address before this PR can be reviewed: Missing issue link: Please link the issue this PR addresses using Missing tests: This PR modifies source code but does not include any test changes. Please add or update tests to cover your changes. |
There was a problem hiding this comment.
Pull request overview
Updates default model identifiers across several provider adapters to move away from soon-to-be-deprecated/unsupported models and align defaults with newer, lower-cost options.
Changes:
- Updated default
idvalues (and corresponding docstrings) for xAI, Together, OpenRouter, OpenAI Chat, Moonshot, Gemini, and Fireworks model wrappers. - Swapped Fireworks and Moonshot defaults to newer model IDs intended to remain available/supportable.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| libs/agno/agno/models/xai/xai.py | Update xAI default model id from grok-beta to a newer Grok variant. |
| libs/agno/agno/models/together/together.py | Update Together default model id to MiniMaxAI/MiniMax-M2.7. |
| libs/agno/agno/models/openrouter/openrouter.py | Update OpenRouter default model id from gpt-4o to gpt-5.4-mini. |
| libs/agno/agno/models/openai/chat.py | Update OpenAI Chat default model id from gpt-4o to gpt-5.4-mini. |
| libs/agno/agno/models/moonshot/moonshot.py | Update Moonshot default model id from kimi-k2-thinking to kimi-k2.5. |
| libs/agno/agno/models/google/gemini.py | Update Gemini default model id from gemini-2.0-flash-001 to gemini-flash-latest. |
| libs/agno/agno/models/fireworks/fireworks.py | Update Fireworks default model id to accounts/fireworks/models/gpt-oss-120b. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| id: str = "gpt-5.4-mini" | ||
| name: str = "OpenAIChat" | ||
| provider: str = "OpenAI" | ||
| supports_native_structured_outputs: bool = True |
There was a problem hiding this comment.
OpenAIChat’s default model id is updated here, but there are still other OpenAI defaults hard-coded to "gpt-4o" (e.g., agno/models/defaults.py defines DEFAULT_OPENAI_MODEL_ID = "gpt-4o" and OpenAIResponses defaults to "gpt-4o"). This leaves the codebase with multiple conflicting "default" OpenAI model sources. Consider updating the central default constant/usages (and the Responses default if intended) so defaults are consistent across the library.
| @@ -29,7 +29,7 @@ class OpenRouter(OpenAILike): | |||
| these models in order. Example: ["anthropic/claude-sonnet-4", "deepseek/deepseek-r1"] | |||
| """ | |||
|
|
|||
| id: str = "gpt-4o" | |||
| id: str = "gpt-5.4-mini" | |||
| name: str = "OpenRouter" | |||
There was a problem hiding this comment.
OpenRouter’s default model id is updated here, but integration tests still pin the old id (e.g., libs/agno/tests/integration/models/openrouter/* uses OpenRouter(id="gpt-4o")). If those tests run in CI or are used as examples, they’ll likely start failing once the model is deprecated/unavailable. Update the OpenRouter integration tests/examples to the new default (or reference OpenRouter().id) to keep the test suite aligned with this migration.
| id: str = "gemini-flash-latest" | ||
| name: str = "Gemini" | ||
| provider: str = "Google" |
There was a problem hiding this comment.
Gemini’s default model id is updated here, but several integration tests still reference the previous id explicitly (e.g., libs/agno/tests/integration/models/google/* and other integration tests use "gemini-2.0-flash-001"). If the motivation is avoiding upcoming deprecations, those pinned test model IDs should be updated as well to prevent future breakage and to validate the new default in practice.
| id: str = "kimi-k2.5" | ||
| name: str = "Moonshot" |
There was a problem hiding this comment.
MoonShot’s default model id is updated, but unit tests still hard-code the old id (libs/agno/tests/unit/models/moonshot/test_moonshot.py uses "kimi-k2-thinking"). Given the stated goal of migrating away from deprecated models, update those tests (and any docs/examples) to a supported model id so the test suite doesn’t keep validating a model slated for deprecation.
| id: str = "accounts/fireworks/models/gpt-oss-120b" | ||
| name: str = "Fireworks" |
There was a problem hiding this comment.
Fireworks’ default model id is updated here, but integration tests still reference the previous serverless model (e.g., libs/agno/tests/integration/models/fireworks/* uses "accounts/fireworks/models/llama-v3p1-405b-instruct"). If that model is no longer available serverless (per PR description), those tests/examples should be updated to a currently supported Fireworks model to avoid CI breakage and to exercise the new default path.
|
Fixes #7682 by updating deprecated and legacy models across providers. |
- Update DEFAULT_OPENAI_MODEL_ID to gpt-5.4-mini - Update OpenAIResponses default id to gpt-5.4-mini - Keep core OpenAI defaults consistent across model entry points
- OpenRouter tests: gpt-4o -> gpt-5.4-mini - Gemini tests: gemini-2.0-flash-001 -> gemini-flash-latest - Moonshot tests: kimi-k2-thinking -> kimi-k2.5 - Fireworks tests: llama-v3p1-405b-instruct -> gpt-oss-120b - Keep tests aligned with updated provider defaults and deprecation plan
Summary
Updated multiple model providers to newer, actively supported models to prevent upcoming deprecations, improve performance consistency, and significantly reduce operational costs.
Several previously configured models were nearing deprecation deadlines (e.g., Kimi K2 by May 25, Gemini Flash changes by June 1), while others such as GPT-4o are now considered legacy compared to newer, more efficient alternatives.
Additionally, some models (notably from Together AI and Fireworks) have shifted away from serverless availability and now require dedicated deployments, necessitating updates to maintain compatibility and avoid service disruptions.
This update ensures:
Model Changes
gemini-flash-latestto avoid the upcoming Gemini 2.0 Flash deprecationaccounts/fireworks/models/llama-v3p1-405b-instructtoaccounts/fireworks/models/gpt-oss-120bas the previous model is no longer available for serverless usagegrok-betatogrok-4-1-fast-non-reasoning-latestfor a stable, production-ready modelgpt-4otogpt-5.4-minifor improved cost/performancegpt-4otogpt-5.4-minifor for improved cost/performancekimi-k2-thinkingwithkimi-k2.5ahead of K2 deprecation and for lower usage costmistralai/Mixtral-8x7B-Instruct-v0.1toMiniMaxAI/MiniMax-M2.7, reducing input costs significantly (≈50%) and the previous model is no longer available for serverless usageType of change
Checklist
./scripts/format.shand./scripts/validate.sh)Duplicate and AI-Generated PR Check
Additional Notes
It would be valuable to establish a more proactive process for keeping model configurations up to date across providers, especially given the frequency of deprecations and pricing changes.
Additionally, introducing a model recommendation layer could significantly improve user experience. Many users are unsure which model best fits their needs. A simple tiered suggestion system (e.g., low / medium / high capability or cost tiers) could guide users toward better defaults based on their use case.
Happy to contribute to this if aligned with the roadmap.