Skip to content

Claude Desktop gateway routing fails: alias not reverse-mapped to DeepSeek model (400) #856

Description

@vehiclerentropy

Summary

Claude Desktop (Cowork, custom3p managed config) pointed at the opencodex gateway fails with HTTP 400 — the desktop client sends the injected alias model id (e.g. claude-opus-4-8-20261210) and opencodex forwards that alias verbatim to the routed provider (deepseek) instead of reverse-mapping it to the real model (deepseek/deepseek-v4-flash).

Expected

opencodex should reverse-map the alias from claudeCode.desktopProfile.assignments (alias → provider/model) before forwarding to the provider, like it does for Claude Code CLI aliases.

Actual

  • Claude Desktop sends: model=claude-opus-4-8-20261210
  • opencodex forwards to deepseek provider unchanged
  • DeepSeek API rejects: The supported API model names are deepseek-v4-pro or deepseek-v4-flash, but you passed claude-opus-4-8-20261210 (400)
  • Usage log confirms: provider=deepseek, model=claude-opus-4-8-20261210, requestedModel=claude-opus-4-8-20261210, status=400

Repro

  1. ocx login deepseek, add deepseek provider
  2. ocx claude desktop apply (injects configLibrary json with inferenceModels: name=claude-opus-4-8-20261210, labelOverride=Deepseek V4 Flash (deepseek))
  3. Open Claude Desktop → it shows "Deepseek V4 Flash (deepseek)" in the model picker
  4. Send a message → 400, model never reaches DeepSeek

Notes

  • Manually changing the configLibrary name to deepseek/deepseek-v4-flash fails Claude Desktop validation ("is not an Anthropic model"); changing to anthropic/deepseek-v4-flash passes validation but opencodex still forwards it verbatim and DeepSeek rejects it.
  • Environment: opencodex 2.8.0, Claude Desktop 1.24012.9 (macOS), deepseek provider (openai-chat adapter).

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