-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
llmLLM provider relatedLLM provider related
Description
Parent Epic
Depends On
Summary
Override list_models_remote in ClaudeProvider to query the Anthropic models API.
Endpoint
GET https://api.anthropic.com/v1/models
Authorization: x-api-key: {api_key}
anthropic-version: 2023-06-01
Response Shape
{
"data": [
{
"id": "claude-opus-4-6",
"display_name": "Claude Opus 4.6",
"created_at": "2025-08-01T00:00:00Z",
"type": "model"
}
],
"has_more": false,
"first_id": "...",
"last_id": "..."
}API supports pagination via ?after_id= query parameter.
Implementation Notes
- Paginate until
has_more == false, accumulate all pages. - Map
data[].id→ModelInfo::id,data[].display_name→ModelInfo::display_name,
data[].created_at→ModelInfo::created_at. - Cache with provider slug
"claude". - Reuse
self.client(existingreqwest::Client). - Filter to only
"type": "model"entries if other types appear.
Acceptance Criteria
- Full pagination — all pages are fetched and merged.
-
ModelInfopopulated withid,display_name,created_at. - Cached result served within TTL without network call.
- Invalid/expired API key returns
LlmError::Auth, does not cache. - Unit tests with wiremock or similar.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
llmLLM provider relatedLLM provider related