You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #1458 / #1132. The reasoning-model payload shaping
(max_tokens → max_completion_tokens, drop metadata, drop reasoning_effort
when tools are present) and the new CCS_OPENAI_REASONING_MODEL=1 opt-in now
work correctly on the settings / API profile path
(settings-flow.js → resolveOpenAICompatProfileConfig → startOpenAICompatProxy).
This resolved the 400 for my api profile against an OpenAI-compatible gateway
that addresses a reasoning model by an obfuscated model ID. Thank you for that fix.
Problem 1 — the fix never reaches the account / instance path
Dispatch forks on profileInfo.type (dist/dispatcher/target-executor.js):
api profiles are normalized to settings (profile-detector.js) → settings-flow.js,
which starts the OpenAI-compat proxy and applies the shaping.
account profiles → account-flow.js, which only does ensureInstance → set CLAUDE_CONFIG_DIR → execClaude and never starts the
OpenAI-compat proxy.
Because the account path bypasses the proxy layer entirely, nothing reads CCS_OPENAI_REASONING_MODEL and no payload shaping happens. The 400 from #1458
(Unsupported parameter: 'max_tokens' ... use 'max_completion_tokens' instead)
returns whenever an OpenAI-compatible gateway is driven through an account / instance.
Problem 2 — account / instance isolation is OAuth-only by design
The docs and create-command.js only support adding official Claude accounts
(interactive OAuth login, isolated tokens per instance). Driving an
OpenAI-compatible API through this path is effectively a short-circuit on my side —
it is not an officially supported configuration.
But the per-account instance isolation itself (CLAUDE_CONFIG_DIR separation,
isolated history / tokens) is genuinely valuable for API profiles too, independent
of whether the backend is Claude or an OpenAI-compatible gateway.
Suggestion
Make payload shaping reachable from the account path. When an
account / instance is backed by an OpenAI-compatible endpoint, route it through
the same proxy / shaping layer the settings path already uses, so both CCS_OPENAI_REASONING_MODEL and the auto-detection apply consistently across
both dispatch flows.
Officially support API-backed accounts / instances. Allow ccs account
style instance isolation for api profiles (baseUrl + key + model), not just
official Claude OAuth. This would make "use an API endpoint as an isolated
account / instance" a first-class, documented feature instead of a short-circuit.
Option 1 fixes the immediate correctness gap; option 2 addresses the underlying
design limitation. They are complementary.
Repro (account path)
Create an account / instance and point its isolated config at an
OpenAI-compatible gateway whose ANTHROPIC_MODEL is a GPT-5.x / o-series
reasoning model addressed by a non-gpt-5* (obfuscated) ID.
The equivalent api (settings) profile with CCS_OPENAI_REASONING_MODEL=1
works, confirming the shaping logic itself is correct — it is simply not
wired into the account path.
Environment
CCS v8.2.0 (Homebrew, @kaitranntt/ccs@8.2.0)
Profile: api / CCS_DROID_PROVIDER=generic-chat-completion-api,
OpenAI-compatible ANTHROPIC_BASE_URL, obfuscated model ID
Context
Follow-up to #1458 / #1132. The reasoning-model payload shaping
(
max_tokens→max_completion_tokens, dropmetadata, dropreasoning_effortwhen tools are present) and the new
CCS_OPENAI_REASONING_MODEL=1opt-in nowwork correctly on the settings / API profile path
(
settings-flow.js→resolveOpenAICompatProfileConfig→startOpenAICompatProxy).This resolved the 400 for my
apiprofile against an OpenAI-compatible gatewaythat addresses a reasoning model by an obfuscated model ID. Thank you for that fix.
Problem 1 — the fix never reaches the account / instance path
Dispatch forks on
profileInfo.type(dist/dispatcher/target-executor.js):apiprofiles are normalized tosettings(profile-detector.js) →settings-flow.js,which starts the OpenAI-compat proxy and applies the shaping.
accountprofiles →account-flow.js, which only doesensureInstance → set CLAUDE_CONFIG_DIR → execClaudeand never starts theOpenAI-compat proxy.
Because the account path bypasses the proxy layer entirely, nothing reads
CCS_OPENAI_REASONING_MODELand no payload shaping happens. The 400 from #1458(
Unsupported parameter: 'max_tokens' ... use 'max_completion_tokens' instead)returns whenever an OpenAI-compatible gateway is driven through an account / instance.
Problem 2 — account / instance isolation is OAuth-only by design
The docs and
create-command.jsonly support adding official Claude accounts(interactive OAuth login, isolated tokens per instance). Driving an
OpenAI-compatible API through this path is effectively a short-circuit on my side —
it is not an officially supported configuration.
But the per-account instance isolation itself (
CLAUDE_CONFIG_DIRseparation,isolated history / tokens) is genuinely valuable for API profiles too, independent
of whether the backend is Claude or an OpenAI-compatible gateway.
Suggestion
Make payload shaping reachable from the account path. When an
account / instance is backed by an OpenAI-compatible endpoint, route it through
the same proxy / shaping layer the settings path already uses, so both
CCS_OPENAI_REASONING_MODELand the auto-detection apply consistently acrossboth dispatch flows.
Officially support API-backed accounts / instances. Allow
ccs accountstyle instance isolation for
apiprofiles (baseUrl + key + model), not justofficial Claude OAuth. This would make "use an API endpoint as an isolated
account / instance" a first-class, documented feature instead of a short-circuit.
Option 1 fixes the immediate correctness gap; option 2 addresses the underlying
design limitation. They are complementary.
Repro (account path)
OpenAI-compatible gateway whose
ANTHROPIC_MODELis a GPT-5.x / o-seriesreasoning model addressed by a non-
gpt-5*(obfuscated) ID.400 ... use 'max_completion_tokens' instead— the same failure asbug: OpenAI-compat proxy skips reasoning-model payload shaping when model is an opaque/obfuscated ID (generic-chat-completion-api) #1458, because
account-flow.jsnever invokes the shaping proxy.api(settings) profile withCCS_OPENAI_REASONING_MODEL=1works, confirming the shaping logic itself is correct — it is simply not
wired into the account path.
Environment
@kaitranntt/ccs@8.2.0)api/CCS_DROID_PROVIDER=generic-chat-completion-api,OpenAI-compatible
ANTHROPIC_BASE_URL, obfuscated model ID