feat: add a model registry so you can use `provider/model` strings wi…
Merged
OM
9mo ago+13189+13189+01234567890123456789012345678901234567890123456789-2352-2352-0123456789012345678901234567890123456789
…thout importing provider
PR Checklist
Please check if your PR fulfills the following requirements:
- The commit message follows our guidelines: https://voltagent.dev/docs/community/contributing/#commit-convention
Bugs / Features
- Related issue(s) linked
- Tests for the changes have been added
- Docs have been added / updated
- Changesets have been added https://voltagent.dev/docs/community/contributing/#creating-a-changeset
What is the current behavior?
What is the new behavior?
fixes (issue)
Notes for reviewers
Summary by cubic
Adds a built-in model registry and router so you can set model: "provider/model" without importing provider SDKs. Updates examples and templates to use model strings and removes provider dependencies.
-
New Features
- Resolve provider/model strings at runtime (OpenAI, Anthropic, Google, Groq, Amazon Bedrock, Google Vertex).
- Agents and scorers accept string model references; dynamic model functions can return strings.
- Next.js chatbot template normalizes model via env (OPENAI_MODEL, ANTHROPIC_MODEL, GOOGLE_MODEL, GROQ_MODEL) and falls back to openai/gpt-4o-mini.
-
Migration
- Replace openai("gpt-4o-mini") and similar with "openai/gpt-4o-mini".
- Remove @ai-sdk/* provider imports and dependencies from apps/examples.
- For Bedrock, use standard AWS env vars and "amazon-bedrock/".
- Update types where needed (e.g., LanguageModel -> AgentModelReference in scorers).