Skip to content

Map OpenRouter ids to each provider's native model names #16

Description

@TheCoder30ec4

Motivation

Routes come back as OpenRouter ids such as anthropic/claude-opus-5.5. Users on Option A call the provider directly, and native names can differ (Anthropic's API uses claude-opus-5-5).

Proposal

Add router.native_model_id(model_id). Possible sources, in order:

  1. A field in OpenRouter's model data, if one exists (check canonical_slug and hugging_face_id)
  2. A small per-provider rule: drop the prefix, then provider-specific fixes (e.g. Anthropic . to -)
  3. A user override: Router(..., native_ids={"anthropic/claude-opus-5.5": "claude-opus-5-5"})

Done when

  • Mapping verified against real provider model lists for OpenAI, Anthropic and Google
  • Documented, with unknown cases returning the input unchanged

Activity

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

    area: catalogLive model list, prices and provider filteringenhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions