---
name: "Fetch real context window size from Anthropic models API"
---

# Story 90: Fetch real context window size from Anthropic models API

## User Story

As a user chatting with a Claude model, I want the context remaining indicator to show the actual context window size for the selected model (fetched from the Anthropic API) instead of a hardcoded value, so that the indicator is accurate across all current and future models.

## Acceptance Criteria

- [ ] Backend AnthropicModelInfo struct deserializes the context_window field from the Anthropic /v1/models response
- [ ] Backend /anthropic/models endpoint returns both model ID and context window size to the frontend
- [ ] Frontend uses the real context window size from the API response instead of the hardcoded getContextWindowSize map for Anthropic models
- [ ] Context indicator in ChatHeader displays the correct percentage based on the real context window size
- [ ] Hardcoded fallback remains for Ollama/local models that don't provide context window metadata

## Out of Scope

- TBD
