Skip to content

Add opt-in tier-based routing for Claude ingress #7430

Closed as not planned
Closed as not planned

Description

@oliver-mee

What are you trying to accomplish?

I want Claude Code requests entering OpenCodex to be routed by Claude model tier, such as Opus, Sonnet, or Haiku, without maintaining a separate route for every versioned model ID.

What prevents this today?

The Claude Code tierModels setting chooses launch defaults. modelMap rewrites explicit model IDs. Neither provides an opt-in router-level policy for selecting a target route from the tier of an incoming Claude request. The current workarounds are to maintain individual model-ID mappings or change launch defaults, which does not control requests that arrive through Claude ingress.

What should OpenCodex do?

Provide an opt-in tier-routing policy for Claude ingress. When configured, OpenCodex should identify the incoming Claude model tier and route the request to that tier's selected target. With the policy unset, current behavior should remain unchanged. Keep existing modelMap behavior compatible, and document and test how the two policies interact.

Example usage or interface

This describes the expected behavior, not a proposed configuration schema:

model = claude-opus-<version>    -> configured Opus route
model = claude-sonnet-<version>  -> configured Sonnet route
model = claude-haiku-<version>   -> configured Haiku route

Leaving tier routing unset should preserve current routing behavior.

Alternatives or workarounds

  • Add each Claude model ID to modelMap, then update the mappings as model IDs change.
  • Use tierModels to select launch defaults, which does not route requests already arriving through the proxy.

Additional context

The Claude Code guide documents the current launch defaults and model mapping behavior. I searched the open and closed issues and pull requests, and did not find an existing proposal for router-level tier routing.

Checks

  • I searched existing issues and documentation.
  • This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
  • I removed secrets and personal data.

Activity

  1. github-actions commented on Oct 20, 2026

    @github-actions
    Contributor

    Automated translation bookkeeping — detected language: English.

  2. added
    enhancement
    on Oct 20, 2026
  3. Ingwannu commented on Oct 20, 2026

    @Ingwannu
    Owner

    Checked against trusted dev 12025981e5a304cdb6b1b54f525ba8554f623977. The existing tierModels launch defaults and explicit modelMap rewrite have different owners. Keep router-level tier routing opt-in and as a design item: specify precedence against exact modelMap/account-qualified models, provider/model/effort-qualified routes, unknown/future Claude names, combo selection, and preview/count_tokens. Owner approval of that contract and saved-config migration is needed before changing defaults or adding controls; no UI or routing policy is implemented by this comment.

  4. oliver-mee commented on Oct 20, 2026

    @oliver-mee
    ContributorAuthor

    Thanks. The proposed contract is now documented and covered in #7435, including exact mappings, qualified selectors and effort rows, future/unknown names, combo selection, preview and count_tokens.

    It stays opt-in, with no default or UI changes and no automatic conversion of existing modelMap or tierModels settings. Invalid policy salvage preserves unrelated configuration. I also fixed combo rename/public-alias migration for the new saved references in e84a5ec.

    The PR records the full red suite result, exact-base failure comparisons and the documented resource exception for the final focused checks. I am requesting review of that contract, not treating this as owner approval or bypassing maintainer-started CI before merge.

  5. lidge-jun commented on Nov 15, 2026

    @lidge-jun
    Owner

    Closing to match the decision recorded on #7435: OpenCodex will not add router-level tier routing for Claude ingress. The supported ways to steer Claude Code model ids remain modelMap, the discovery aliases and the intercept bindings. Thanks @oliver-mee for the complete contract and tests; they made the trade-off clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions