From cde607f455a1af62c861a39be5eb7048f43811fd Mon Sep 17 00:00:00 2001 From: Dave Date: Mon, 23 Feb 2026 18:32:56 +0000 Subject: [PATCH] story-kit: create 90_story_fetch_real_context_window_size_from_anthropic_models_api --- ...t_window_size_from_anthropic_models_api.md | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .story_kit/work/1_upcoming/90_story_fetch_real_context_window_size_from_anthropic_models_api.md diff --git a/.story_kit/work/1_upcoming/90_story_fetch_real_context_window_size_from_anthropic_models_api.md b/.story_kit/work/1_upcoming/90_story_fetch_real_context_window_size_from_anthropic_models_api.md new file mode 100644 index 0000000..2c01ea0 --- /dev/null +++ b/.story_kit/work/1_upcoming/90_story_fetch_real_context_window_size_from_anthropic_models_api.md @@ -0,0 +1,22 @@ +--- +name: "Fetch real context window size from Anthropic models API" +test_plan: pending +--- + +# 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