Skip to content

Add Openrouter Opus 4.7 Entry - #26130

Merged
ishaan-berri merged 1 commit into
BerriAI:litellm_ishaan_apri21from
gobii-ai:openrouter-opus-4-7
Apr 22, 2026
Merged

Add Openrouter Opus 4.7 Entry#26130
ishaan-berri merged 1 commit into
BerriAI:litellm_ishaan_apri21from
gobii-ai:openrouter-opus-4-7

Conversation

@matt-greathouse

Copy link
Copy Markdown
Contributor

Relevant issues

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/test_litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem
  • I have requested a Greptile review by commenting @greptileai and received a Confidence Score of at least 4/5 before requesting a maintainer review

Delays 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)

CI status guideline:

  • 50-55 passing tests: main is stable with minor issues.
  • 45-49 passing tests: acceptable but needs attention
  • <= 40 passing tests: unstable; be careful with your merges and assess the risk.
  • 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

@greptile-apps

greptile-apps Bot commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a single model entry — openrouter/anthropic/claude-opus-4.7 — to model_prices_and_context_window.json. The pricing, context window (1M input / 128K output), and capability flags align with the canonical claude-opus-4-7 Anthropic entry already in the file.

Confidence Score: 5/5

Safe 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.

Important Files Changed

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

@gitguardian

gitguardian Bot commented Apr 20, 2026

Copy link
Copy Markdown

️✅ 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.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 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.

Comment on lines +25138 to +25159
"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
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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

codecov Bot commented Apr 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ishaan-berri
ishaan-berri changed the base branch from litellm_internal_staging to litellm_ishaan_apri21 April 22, 2026 02:28
@ishaan-berri
ishaan-berri merged commit db85c3e into BerriAI:litellm_ishaan_apri21 Apr 22, 2026
41 of 42 checks passed
ishaan-berri added a commit that referenced this pull request Apr 22, 2026
* 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>
fzowl pushed a commit to fzowl/litellm that referenced this pull request Jun 24, 2026
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants