Skip to content

Fix model routing for claude-max/* prefixed model names #23

@sven-ea-assistant

Description

@sven-ea-assistant

Objective

Fix model extraction so OpenAI-style model names with provider prefixes (e.g. claude-max/claude-sonnet-4) route correctly instead of falling back to opus.

Problem

extractModel() currently strips only claude-code-cli/, so claude-max/claude-sonnet-4 stays prefixed and fails MODEL_MAP lookup.

Requirements

  • Update prefix stripping to handle generic <provider>/<model> format.
  • Ensure claude-max/claude-sonnet-4 maps to sonnet.
  • Keep existing behavior for already-unprefixed names.
  • Add/update tests covering prefixed and unprefixed aliases.

Success criteria

  • Requests with model: "claude-max/claude-sonnet-4" are routed to sonnet, not opus fallback.
  • Tests pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions