Skip to content

feat: add custom_pricing (standard/batch/fast) for Claude Opus 4.6/4.7/4.8 - #720

Merged
bhishmendramahala-crypto merged 1 commit into
mainfrom
pricing-update/anthropic-multi-layer
Jul 15, 2026
Merged

feat: add custom_pricing (standard/batch/fast) for Claude Opus 4.6/4.7/4.8#720
bhishmendramahala-crypto merged 1 commit into
mainfrom
pricing-update/anthropic-multi-layer

Conversation

@bhishmendramahala-crypto

@bhishmendramahala-crypto bhishmendramahala-crypto commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds multidimensional custom_pricing for the three Claude Opus models that support Anthropic Fast modeclaude-opus-4-6, claude-opus-4-7, and claude-opus-4-8.

Structure: custom_pricing.regions.default.execution_modes.{standard,batch,fast}.

  • standard: mirrors base pay_as_you_go (input/output + 5m cache write, cache read, and additional_units.cache_write_1h).
  • batch: 50% of standard input/output rates.
  • fast (Opus only — Fast mode):
    • claude-opus-4-6 / claude-opus-4-7: $30 / MTok input, $150 / MTok output
    • claude-opus-4-8: $10 / MTok input, $50 / MTok output
    • cache multipliers applied on top of fast rates (5m write 1.25x, 1h write 2x, read 0.1x).

regions.default is used (not global/us) because the current Anthropic pricing resolver emits only the service_tier dimension and falls back to regions['default'] when no region is provided. The us/inference_geo 1.1x data-residency tier is intentionally omitted until the resolver emits a region dimension.

The existing top-level pricing_config (pay_as_you_go + batch_config) is preserved as a fallback for older gateway versions.

Source Verification

Source Links:

Checklist

  • Validated the JSON
  • Prices verified in cents per token (not dollars)
  • Source link included above

Related

  • Gateway PR: Portkey-AI/gateway-enterprise-node#1713 (Anthropic multidimensional pricing resolver)

Copilot AI left a comment

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.

Pull request overview

Adds a new custom_pricing structure to Anthropic model pricing to support multi-layer pricing by region and execution mode (while keeping pricing_config as a fallback for older gateway versions).

Changes:

  • Introduces custom_pricing.regions.{global,us}.execution_modes for claude-opus-4-6 (standard/batch/fast) and claude-sonnet-4-6 (standard/batch).
  • Adds cache token pricing entries (cache_write_input_token, cache_read_input_token) to the top-level batch_config for both models.
  • Adds US-region uplifted pricing (10%) and fast-mode pricing for Opus.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pricing/anthropic.json Outdated
Comment thread pricing/anthropic.json Outdated
Comment thread pricing/anthropic.json
Comment thread pricing/anthropic.json Outdated
Comment thread pricing/anthropic.json Outdated
Comment thread pricing/anthropic.json Outdated
Comment thread pricing/anthropic.json Outdated
Comment thread pricing/anthropic.json Outdated
Comment thread pricing/anthropic.json Outdated
Comment thread pricing/anthropic.json Outdated
@bhishmendramahala-crypto
bhishmendramahala-crypto force-pushed the pricing-update/anthropic-multi-layer branch from 8bce4f4 to 2f9ccfc Compare April 16, 2026 12:29
@narengogi
narengogi marked this pull request as draft April 16, 2026 19:46
…7/4.8

Adds multidimensional custom_pricing under regions.default with standard,
batch, and fast execution_modes for claude-opus-4-6, claude-opus-4-7, and
claude-opus-4-8. Fast-mode rates per Anthropic pricing docs (Opus 4.6/4.7:
$30/$150 per MTok; Opus 4.8: $10/$50 per MTok), with 5m/1h cache-write and
cache-read multipliers applied.

Source: https://docs.claude.com/en/docs/about-claude/pricing
@bhishmendramahala-crypto
bhishmendramahala-crypto force-pushed the pricing-update/anthropic-multi-layer branch from 2f9ccfc to 685e09a Compare June 24, 2026 18:15
@bhishmendramahala-crypto bhishmendramahala-crypto changed the title feat: add multi-layer custom_pricing for Anthropic models feat: add custom_pricing (standard/batch/fast) for Claude Opus 4.6/4.7/4.8 Jun 24, 2026
@bhishmendramahala-crypto
bhishmendramahala-crypto marked this pull request as ready for review June 26, 2026 06:54
@bhishmendramahala-crypto
bhishmendramahala-crypto merged commit f548ccd into main Jul 15, 2026
2 checks passed
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.

3 participants