Command Code GOAT Provider Architecture

Command Code GOAT Provider Architecture An architecture diagram generated by Archify. Copilot Chat · VS Code UI · VS Code Extension Client Copilot Chat VS Code UI GOAT Provider · ChatModelProvider · VS Code Extension Client · SecretStorage GOAT Provider ChatModelProvider SecretStorage Prompt Guidance · grounding & sanitize · VS Code Extension Client Prompt Guidance grounding & sanitize Protocol Router · format selector · VS Code Extension Client Protocol Router format selector Anthropic Wire · POST /messages · VS Code Extension Client · Anthropic Anthropic Wire POST /messages OpenAI Wire · POST /completions · VS Code Extension Client · OpenAI OpenAI Wire POST /completions Tool Call Engine · parser & auto-repair · VS Code Extension Client Tool Call Engine parser & auto-repair SSE Transport · HTTP client & retry · VS Code Extension Client SSE Transport HTTP client & retry Command Code · api.commandcode.ai · Command Code API & Models Command Code api.commandcode.ai 60+ AI Models · Claude, DeepSeek, Qwen... · Command Code API & Models 60+ AI Models Claude, DeepSeek, Qwen... prompt grounding Claude OpenAI-compat HTTPS SSE (ZDR) route SSE tokens yield parts VS Code Extension Client Command Code API & Models Legend Frontend Backend Cloud Security External

Dual Wire Protocol

  • • Claude models automatically route to Anthropic Messages (/provider/v1/messages)
  • • Open models route to OpenAI-compatible Chat Completions (/provider/v1/chat/completions)
  • • Static catalog authority ensures strict capability enforcement and context limits

Stream & Tool Engine

  • • Streaming scanner incrementally assembles fragmented JSON and XML tool calls
  • • Heuristic repair auto-coerces argument types and deduplicates duplicate invocations
  • • Nudge continuation recovers turns when models announce actions without tool payloads

Security & Resilience

  • • API keys stored in VS Code SecretStorage — never logged or exported to files
  • • Optional Zero Data Retention (ZDR) mode sends x-cmd-zdr: 1 header on all requests
  • • Exponential backoff retry with full jitter on 429 rate limits and 5xx outages