fix(command-code): use the documented /provider/v1 chat endpoint (#10265) (#11072)

5 — Fecha #10265: chat do command-code migra do endpoint CLI-only /alpha/generate (version-gated + proxy-blocked para callers externos) para o documentado /provider/v1/chat/completions (OpenAI format). Removido o envelope CLI reverse-engineered (config/memory/taste/skills + headers CLI-impersonation), substituído por passthrough OpenAI plano com normalização de model id vendor-prefixed (#10809), clamp de max_tokens (#5166), sanitização de reasoning_effort. commandCode.ts 1037→171 linhas.
Validado no worktree board sobre tip: typecheck:core limpo; 175/175 testes focados (command-code executor/vision/usage/maxtokens/user-array/validation-specialty/responses-handler/provider-models-scoping); changelog-integrity/file-size/complexity/cognitive todos OK. TDD RED→GREEN documentado.
This commit is contained in:
Diego Rodrigues de Sa e Souza
2026-08-21 22:16:45 -03:00
committed by GitHub
parent e06f8b7ec0
commit b6412c6fed
13 changed files with 527 additions and 2579 deletions

View File

@@ -83,7 +83,7 @@ export const APIKEY_PROVIDERS_GATEWAYS = {
textIcon: "CC",
website: "https://commandcode.ai/",
authHint:
"Use a Command Code API key. Requests are sent to Command Code's /alpha/generate endpoint.",
"Use a Command Code API key. Requests are sent to Command Code's /provider/v1/chat/completions endpoint.",
apiHint: "Create or copy an API key from Command Code, then paste it here as a Bearer token.",
},
openrouter: {