Skip to content

Use Claude Code with your ChatGPT, Kimi, Cursor or Grok subscription via a local Anthropic-compatible proxy

Rust

map max effort to xhigh for codex and high for kimi

Raine Virta3a7be79ed6bf
diff --git a/src/anthropic/schema.ts b/src/anthropic/schema.ts
index 916a628..c707cb6 100644
--- a/src/anthropic/schema.ts
+++ b/src/anthropic/schema.ts
@@ -61,7 +61,7 @@ export interface AnthropicRequest {
stream?: boolean
thinking?: { type: string; [k: string]: unknown }
output_config?: {
- effort?: "low" | "medium" | "high" | "xhigh"
+ effort?: "low" | "medium" | "high" | "max"
format?: { type: "json_schema"; schema: unknown; name?: string; strict?: boolean }
}
context_management?: unknown
diff --git a/src/providers/kimi/translate/request.ts b/src/providers/kimi/translate/request.ts
index 5535436..0b55c3f 100644
--- a/src/providers/kimi/translate/request.ts
+++ b/src/providers/kimi/translate/request.ts
@@ -101,13 +101,13 @@ function clampMaxTokens(requested: number | undefined): number {
return Math.min(requested, DEFAULT_MAX_TOKENS)
}
-// Kimi's reasoning_effort is capped at "high"; collapse the proxy's "xhigh"
-// extension to "high" since Kimi has no stronger tier, and default to "medium"
-// when no effort is requested.
+// Kimi's reasoning_effort is capped at "high"; collapse the proxy's "max"
+// to "high" since Kimi has no stronger tier, and default to "medium" when no
+// effort is requested.
function mapReasoningEffort(
effort: NonNullable<AnthropicRequest["output_config"]>["effort"],
): "low" | "medium" | "high" {
- if (effort === "xhigh") return "high"
+ if (effort === "max") return "high"
return effort ?? "medium"
}