Skip to content

[Config]: kimi-k2.7-code fails with Moonshot invalid thinking via Codex++ proxy #1180

Description

@xuanweijiang

接入模式

纯 API

上游协议

Responses API

Base URL

https://your-proxy.example.com/v1

相关 config.toml / auth.json 片段

model_provider = "custom"
model = "kimi-k2.7-code"
model_reasoning_effort = "high"
review_model = "gpt-5.5"

[model_providers.custom]
name = "custom"
wire_api = "responses"
requires_openai_auth = true
base_url = "http://127.0.0.1:57321/v1" # Codex++ local proxy; upstream custom proxy domain is configured in Codex++ and redacted

问题描述

Summary

When using kimi-k2.7-code through Codex++ with my own upstream proxy, Codex can list the model but chat requests fail with a Moonshot provider error:

Error from provider (Moonshot AI): invalid thinking: only type=enabled is allowed for this model

Environment

  • OS: Windows
  • Codex++: v1.2.18
  • Access mode: pure API / custom upstream proxy
  • Upstream protocol: Responses API
  • Codex local Base URL: http://127.0.0.1:57321/v1 (Codex++ local proxy)
  • Actual upstream proxy domain: self-hosted/custom domain, redacted as https://your-proxy.example.com/v1
  • Model: kimi-k2.7-code
  • Reasoning effort: high

What happens

  1. Start Codex++.
  2. Configure Codex++ to route Codex requests through my own upstream proxy domain.
  3. Codex uses the local Codex++ proxy at http://127.0.0.1:57321/v1.
  4. Select kimi-k2.7-code.
  5. Send a normal chat message.
  6. The request fails with the Moonshot error above.

Expected behavior

Codex++ should translate or sanitize the reasoning/thinking fields for Moonshot/Kimi code models before forwarding the request to the upstream proxy/provider.

For this model, Moonshot appears to reject incompatible thinking payloads and expects only an enabled thinking form, or no unsupported reasoning/thinking fields depending on the exact upstream endpoint.

Notes

  • Other Kimi models such as kimi-k2.6 do not appear to trigger the same error in this setup.
  • A local test proxy placed before Codex++ that only patched kimi-k2.7-code requests by removing incompatible reasoning fields and forcing thinking: { "type": "enabled" } allowed minimal test requests to pass. This suggests the failure is likely in Codex++'s request conversion/forwarding for this model family.
  • No API keys, account tokens, or real upstream domains are included in this report.

日志 / 状态文件

Observed error:

Error from provider (Moonshot AI): invalid thinking: only type=enabled is allowed for this model

Codex local Base URL:
http://127.0.0.1:57321/v1

Actual upstream Base URL:
self-hosted/custom proxy domain, redacted as https://your-proxy.example.com/v1

The model list endpoint can return kimi-k2.7-code, but conversation requests fail.

提交前确认

  • 我已经脱敏了 API Key、Token、账号等敏感信息。

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