Skip to content

moonshot: native chat passthrough forwards role 'developer', api.moonshot.ai rejects it with 400 #7583

Closed

Description

@lidge-jun

Summary

Requests routed to the moonshot registry provider (https://api.moonshot.ai/v1) fail with

Provider error 400: Invalid request: role 'developer' is not allowed

when the inbound request arrives on /v1/chat/completions and carries a developer message.

Where it happens

From the request log (ocx logs get), the failing row is:

  • protocolTrace.inbound: chat, mode: native, reasonCodes: [same-wire-native]
  • attempts[0].adapter: openai-chat, failureCause: payload-rejected

The translated route already folds developer into system when foldDeveloperRoleToSystem is unset (translatedChatDeveloperWireRole), so Codex/Responses traffic is fine. The native chat passthrough only rewrites the role on an explicit record (applyExplicitChatDeveloperRole), and the moonshot preset records nothing, so the caller's developer role is forwarded verbatim and Moonshot rejects it.

Workaround

Set foldDeveloperRoleToSystem: true on the provider (dashboard JSON editor or ocx provider snapshot / apply). Verified on 2.89.0: the same request then completes.

Proposed fix

Let registry entries record foldDeveloperRoleToSystem (seeded into new configs and backfilled at resolve time, user value wins, same path as openaiChatEofTolerance), and record true for moonshot.

Activity

  1. lidge-jun commented on Oct 23, 2026

    @lidge-jun
    OwnerAuthor

    Fixed by #7584 (merged to dev).

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions