Resolve
The resolve endpoint is the core of Model Graph. Given any model identifier string — from any SDK, platform, or provider — it finds the matching model and suggests an upgrade in the same format.
This powers tools like AI Updater Bot, which scans codebases for outdated model references and creates PRs with upgrades.
Resolve a model string
GET /api/v1/resolve?q={detected_string}
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | Yes | The model identifier string to resolve |
How Matching Works
The resolver tries to match the input string against all known aliases in three stages:
- Exact match (confidence:
1.0) — the string exactly matches a known alias - Normalized match (confidence:
0.8) — the string matches after normalization (stripping version suffixes, provider prefixes, etc.) - Substring match (confidence:
0.5) — the string is a substring of a known alias, or vice versa
Format-Preserving Replacement
When a match is found and an upgrade is available, the resolver returns the upgrade model's alias with the same source as the matched alias. This means:
- If you pass a Bedrock-format string, you get a Bedrock-format upgrade
- If you pass a LiteLLM-format string, you get a LiteLLM-format upgrade
- If you pass an official string, you get an official upgrade
This eliminates the need for any format conversion on the consumer's side.
Examples
Official model ID
curl "https://api.modelgraph.ai/api/v1/resolve?q=claude-3-sonnet-20240229"
{
"matched_model": {
"slug": "claude-3-sonnet-20240229",
"display_name": "Claude 3 Sonnet",
"status": "deprecated",
"family": "claude-sonnet"
},
"matched_alias": {
"alias": "claude-3-sonnet-20240229",
"source": "official"
},
"confidence": 1.0,
"is_latest": false,
"upgrade": {
"slug": "claude-sonnet-4-6",
"display_name": "Claude Sonnet 4.6",
"status": "latest"
},
"upgrade_alias": {
"alias": "claude-sonnet-4-6",
"source": "official"
}
}
AWS Bedrock format
curl "https://api.modelgraph.ai/api/v1/resolve?q=anthropic.claude-3-5-sonnet-20241022-v2:0"
{
"matched_model": {
"slug": "claude-3-5-sonnet-20241022",
"display_name": "Claude 3.5 Sonnet",
"status": "active",
"family": "claude-sonnet"
},
"matched_alias": {
"alias": "anthropic.claude-3-5-sonnet-20241022-v2:0",
"source": "bedrock"
},
"confidence": 1.0,
"is_latest": false,
"upgrade": {
"slug": "claude-sonnet-4-6",
"display_name": "Claude Sonnet 4.6",
"status": "latest"
},
"upgrade_alias": {
"alias": "anthropic.claude-sonnet-4-6-v1:0",
"source": "bedrock"
}
}
LiteLLM format
curl "https://api.modelgraph.ai/api/v1/resolve?q=anthropic/claude-3-5-sonnet-20241022"
{
"matched_model": {
"slug": "claude-3-5-sonnet-20241022",
"display_name": "Claude 3.5 Sonnet",
"status": "active",
"family": "claude-sonnet"
},
"matched_alias": {
"alias": "anthropic/claude-3-5-sonnet-20241022",
"source": "litellm"
},
"confidence": 1.0,
"is_latest": false,
"upgrade": {
"slug": "claude-sonnet-4-6",
"display_name": "Claude Sonnet 4.6",
"status": "latest"
},
"upgrade_alias": {
"alias": "anthropic/claude-sonnet-4-6",
"source": "litellm"
}
}
Already-latest model
curl "https://api.modelgraph.ai/api/v1/resolve?q=claude-sonnet-4-6"
{
"matched_model": {
"slug": "claude-sonnet-4-6",
"display_name": "Claude Sonnet 4.6",
"status": "latest",
"family": "claude-sonnet"
},
"matched_alias": {
"alias": "claude-sonnet-4-6",
"source": "official"
},
"confidence": 1.0,
"is_latest": true,
"upgrade": null,
"upgrade_alias": null
}
Response Fields
| Field | Type | Description |
|---|---|---|
matched_model | object | The canonical model this string maps to |
matched_model.slug | string | Model slug |
matched_model.display_name | string | Human-readable name |
matched_model.status | string | active, latest, deprecated, or sunset |
matched_model.family | string | Family slug |
matched_alias | object | The specific alias that matched |
matched_alias.alias | string | The exact alias string |
matched_alias.source | string | Which SDK/platform uses this alias |
confidence | number | Match confidence: 1.0 exact, 0.8 normalized, 0.5 substring |
is_latest | boolean | Whether the matched model is already the latest in its family |
upgrade | object | null | The recommended replacement model (null if already latest) |
upgrade_alias | object | null | The replacement string in the same format as the input |
Errors
| Status | Code | Description |
|---|---|---|
| 400 | bad_request | Missing q parameter |
| 404 | not_found | No matching model found for the given string |