Add Openrouter Opus 4.7 Entry - #26130
Conversation
Greptile SummaryThis PR adds a single model entry — Confidence Score: 5/5Safe to merge; only P2 style suggestions remain. The change is a single JSON model entry with values that match the canonical claude-opus-4-7 Anthropic definition. No logic, security, or data-integrity issues were found; remaining comments are cosmetic (ordering and a clarification question on one flag). No files require special attention.
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | Adds openrouter/anthropic/claude-opus-4.7 entry with pricing, context window, and capability flags consistent with the canonical claude-opus-4-7 Anthropic entry; minor placement and supports_assistant_prefill differences noted |
Reviews (1): Last reviewed commit: "Add Openrouter Opus 4.7 Entry" | Re-trigger Greptile
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
| "openrouter/anthropic/claude-opus-4.7": { | ||
| "cache_creation_input_token_cost": 6.25e-06, | ||
| "cache_read_input_token_cost": 5e-07, | ||
| "input_cost_per_token": 5e-06, | ||
| "litellm_provider": "openrouter", | ||
| "max_input_tokens": 1000000, | ||
| "max_output_tokens": 128000, | ||
| "max_tokens": 128000, | ||
| "mode": "chat", | ||
| "output_cost_per_token": 2.5e-05, | ||
| "supports_assistant_prefill": false, | ||
| "supports_computer_use": true, | ||
| "supports_function_calling": true, | ||
| "supports_pdf_input": true, | ||
| "supports_prompt_caching": true, | ||
| "supports_reasoning": true, | ||
| "supports_response_schema": true, | ||
| "supports_tool_choice": true, | ||
| "supports_vision": true, | ||
| "supports_xhigh_reasoning_effort": true, | ||
| "tool_use_system_prompt_tokens": 346 | ||
| }, |
There was a problem hiding this comment.
Entry placement breaks grouping of OpenRouter Anthropic Opus models
The new openrouter/anthropic/claude-opus-4.7 entry is inserted after openrouter/anthropic/claude-haiku-4.5 (line 25137) rather than next to the other Opus 4.x entries. The existing OpenRouter Anthropic Opus entries appear together at lines 24968–25094 (claude-opus-4, claude-opus-4.1, claude-opus-4.5, claude-opus-4.6), followed by claude-sonnet-4.5 and claude-haiku-4.5. Moving the new entry to immediately after claude-opus-4.6 would keep the file consistently grouped by model family.
| "max_tokens": 128000, | ||
| "mode": "chat", | ||
| "output_cost_per_token": 2.5e-05, | ||
| "supports_assistant_prefill": false, |
There was a problem hiding this comment.
supports_assistant_prefill differs from prior Opus openrouter entries
openrouter/anthropic/claude-opus-4.6 (line 25086) has "supports_assistant_prefill": true, but this entry sets it to false. This is consistent with the canonical claude-opus-4-7 Anthropic entry, so it may be intentional for this model version. Just worth confirming the OpenRouter deployment of claude-opus-4.7 indeed does not support assistant prefill (since the prior Opus openrouter entries did).
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
db85c3e
into
BerriAI:litellm_ishaan_apri21
* fix(otel): preserve Splunk Observability Cloud trace OTLP endpoint (#26183) * fix(otel): preserve Splunk Observability Cloud trace OTLP URL Splunk ingest uses /v2/trace/otlp; _normalize_otel_endpoint must not append /v1/traces. - Return trace endpoints unchanged when they match Splunk OTLP path patterns - Add unit tests for observability.splunkcloud.com, signalfx.com, and /trace/otlp suffix - Set OTEL_EXPORTER_OTLP_PROTOCOL in protocol selection tests (from_env precedence over OTEL_EXPORTER) Made-with: Cursor * test(otel): use parameterized.expand for Splunk OTLP URL cases Made-with: Cursor * fix(otel): narrow Splunk trace URL guard to /v2/trace/otlp only Made-with: Cursor * test(otel): cover OTEL_EXPORTER fallback when OTLP protocol env unset Made-with: Cursor * Add Openrouter Opus 4.7 Entry (#26130) --------- Co-authored-by: milan-berri <milan@berri.ai> Co-authored-by: Matt Greathouse <matt5316@gmail.com>
* fix(otel): preserve Splunk Observability Cloud trace OTLP endpoint (BerriAI#26183) * fix(otel): preserve Splunk Observability Cloud trace OTLP URL Splunk ingest uses /v2/trace/otlp; _normalize_otel_endpoint must not append /v1/traces. - Return trace endpoints unchanged when they match Splunk OTLP path patterns - Add unit tests for observability.splunkcloud.com, signalfx.com, and /trace/otlp suffix - Set OTEL_EXPORTER_OTLP_PROTOCOL in protocol selection tests (from_env precedence over OTEL_EXPORTER) Made-with: Cursor * test(otel): use parameterized.expand for Splunk OTLP URL cases Made-with: Cursor * fix(otel): narrow Splunk trace URL guard to /v2/trace/otlp only Made-with: Cursor * test(otel): cover OTEL_EXPORTER fallback when OTLP protocol env unset Made-with: Cursor * Add Openrouter Opus 4.7 Entry (BerriAI#26130) --------- Co-authored-by: milan-berri <milan@berri.ai> Co-authored-by: Matt Greathouse <matt5316@gmail.com>
Relevant issues
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
tests/test_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 reviewDelays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
CI (LiteLLM team)
Branch creation CI run
Link:
CI run for the last commit
Link:
Merge / cherry-pick CI run
Links:
Screenshots / Proof of Fix
Type
🆕 New Feature
🐛 Bug Fix
🧹 Refactoring
📖 Documentation
🚄 Infrastructure
✅ Test
Changes