Skip to content

zai provider row still stores the retired Chat endpoint after the Responses move #4320

Description

@lidge-jun

Client or integration

OpenCodex dashboard

Area

Provider adapter

Summary

After #4307 moved the zai registry row to the Responses protocol, an existing install still shows the retired Chat endpoint in the dashboard and in config.json:

  • Adapter: openai-chat
  • Base URL: https://api.z.ai/api/coding/paas/v4

The actual requests are already fine. routedProviderConfig() canonicalizes the row on every request because the zai registry entry owns a fixed destination, so the live wire is openai-responses against https://api.z.ai with /api/v1/responses. Only the stored row was never updated.

That mismatch has three visible costs: the provider page reports a protocol the proxy does not use, ocx doctor and any direct config reader inherit the same wrong value, and each boot logs a warning about a base URL the user never chose.

Expected: the saved row is rewritten once to the destination the router already applies, so stored state and live routing agree.

Reproduction

  1. Start from a config where the zai provider was added before the Responses move, so it holds adapter: "openai-chat" and baseUrl: "https://api.z.ai/api/coding/paas/v4".
  2. Update to a build that contains feat(zai): default to the Responses protocol and keep Chat as a per-model opt-in #4307.
  3. ocx start --port 10100, open the dashboard at /#providers, select Zai and open 설정 / Settings.
  4. The adapter field still reads openai-chat and the base URL still reads the /api/coding/paas/v4 endpoint.
  5. Meanwhile the proxy logs configured baseUrl https://api.z.ai/… is ignored because this provider's endpoint is fixed at https://api.z.ai/, and requests leave on /api/v1/responses.

Version

2.52.0

Operating system

macOS 15.5

Provider and model

zai / glm-5.3

Logs or error output

⚠️  config.json provider "zai": configured baseUrl https://api.z.ai/… is ignored because this provider's endpoint is fixed at https://api.z.ai/. A URL saved for a different account or region is a common cause of 401s here — drop it, or use the provider whose endpoint matches.

Redacted configuration

{
  "providers": {
    "zai": {
      "adapter": "openai-chat",
      "baseUrl": "https://api.z.ai/api/coding/paas/v4",
      "authMode": "key",
      "defaultModel": "glm-5.3"
    }
  }
}

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

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

    bugSomething isn't workingproviderProvider adapters, OpenAI-compat presets, upstream API quirks

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions