Update anthropic_beta_headers_config.json to allow vertexai support 1m context#21864
Conversation
add context-1m-2025-08-07 for vertex_ai
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…_vertexai_to_enalbe_1m_context
|
@greptileai help me look at Confidence Score |
|
Based on my review of your PR, here's what's affecting the confidence score: Why the score might be lower than 4/5:
What would raise the score to 4/5+: Add a test similar to the existing anthropic beta header tests that verifies: # Test that context-1m-2025-08-07 is correctly forwarded for vertex_ai
# and that it's filtered out for providers where it's nullYou can likely find similar tests in The code change itself is correct and minimal - it's just missing the verification layer that gives maintainers confidence the fix works. |
Greptile SummaryEnables the
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| litellm/anthropic_beta_headers_config.json | Enables context-1m-2025-08-07 beta header for vertex_ai provider (changed from null to "context-1m-2025-08-07"), making it consistent with all other providers. Also adds a trailing newline to the file. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["Client sends request with\nanthropic-beta: context-1m-2025-08-07"] --> B["filter_and_transform_beta_headers()"]
B --> C{"Look up header in\nprovider config"}
C -->|"Before PR: vertex_ai = null"| D["Header dropped ❌"]
C -->|"After PR: vertex_ai = 'context-1m-2025-08-07'"| E["Header forwarded ✅"]
E --> F["Vertex AI API receives\ncontext-1m-2025-08-07 header"]
Last reviewed commit: 7cd40f1
add context-1m-2025-08-07 for vertex_ai
Relevant issues
Fixes #21861
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
tests/litellm/directory, Adding at least 1 test is a hard requirement - see detailsmake test-unit@greptileaiand received a Confidence Score of at least 4/5 before requesting a maintainer reviewCI (LiteLLM team)
Branch creation CI run
Link:
CI run for the last commit
Link:
Merge / cherry-pick CI run
Links:
Type
🐛 Bug Fix
Changes