Skip to content

feat(providers): add CommandCode provider (GOAT/Pro/Max/Provider plans, salvage of #32909) - #88308

Merged
teknium1 merged 3 commits into
mainfrom
feat/commandcode-provider
Aug 17, 2026
Merged

feat(providers): add CommandCode provider (GOAT/Pro/Max/Provider plans, salvage of #32909)#88308
teknium1 merged 3 commits into
mainfrom
feat/commandcode-provider

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

CommandCode (commandcode.ai) is now a first-class provider — commandcode (OpenAI chat completions) and commandcode-anthropic (Anthropic Messages, Bearer auth) profiles behind one COMMANDCODE_API_KEY, covering their GOAT/Pro/Max/Provider subscription plans (~30+ open and closed models, live model discovery from the public /provider/v1/models endpoint).

Salvages PR #32909 by @ousiaresearch (closed as part of the May mega-PR cleanup, not on merit) — commit cherry-picked onto current main with authorship preserved, plus integration follow-ups.

Changes

  • plugins/model-providers/commandcode/ (salvaged): two provider profiles + manifest, live fetch_models, 28 unit tests
  • agent/anthropic_adapter.py (salvaged, tightened): api.commandcode.ai recognized as a Bearer-auth Anthropic endpoint — upgraded from substring match to base_url_host_matches() so evil.com/api.commandcode.ai paths don't trigger Bearer auth
  • hermes_cli/config_defaults.py: COMMANDCODE_API_KEY setup-wizard entry
  • hermes_cli/doctor.py / hermes_cli/dump.py: key added to doctor scan list and debug-dump api_keys
  • tests/hermes_cli/test_doctor_dedicated_provider_skip.py: exact-name check instead of substring, so Bearer-authed Anthropic-compatible gateways are allowed in the generic health-check loop while native anthropic stays skipped
  • docs: provider table, fallback-providers table, supported-provider lists (integrations/providers.md, configuration.md, cli-commands.md, fallback-providers.md)

Validation

Check Result
Targeted tests (commandcode + providers + doctor + dump + anthropic_adapter) 234 passed
E2E real-import: profile registration, aliases, PROVIDER_REGISTRY auto-extension pass
Bearer-auth host match (positive + negative traversal cases) pass
Live /provider/v1/models fetch 55 models; all fallback IDs still valid

Infographic

CommandCode Provider infographic

Llovos and others added 2 commits August 17, 2026 02:36
Add first-class CommandCode provider with dual API mode support:

profile commandcode (chat_completions):
  20+ models via OpenAI-compatible endpoint
  DeepSeek, Qwen, Kimi, GLM, MiniMax, StepFun, Mimo, Gemini, GPT
  Default: deepseek/deepseek-v4-pro (1M context)

profile commandcode-anthropic (anthropic_messages):
  Claude models via Anthropic Messages-compatible endpoint
  Default: claude-sonnet-4-6 (1M context)

Changes:
- plugins/model-providers/commandcode/ — provider plugin
  - __init__.py: dual ProviderProfile classes with fetch_models
  - plugin.yaml: manifest
- agent/anthropic_adapter.py: recognize api.commandcode.ai as Bearer auth
- tests/plugins/model_providers/test_commandcode_profile.py: 28 tests
- tests/providers/test_plugin_discovery.py: bump profile count 34→36

171 provider tests pass (28 new, 0 regressions)
Follow-ups on top of the salvaged CommandCode provider plugin (PR #32909):

- hermes_cli/config_defaults.py: COMMANDCODE_API_KEY setup-wizard entry
- hermes_cli/doctor.py: add key to the doctor env-var scan list
  (health check comes free via the pluggable-profile loop)
- hermes_cli/dump.py: include commandcode in debug-dump api_keys
- docs: provider table row, fallback-provider table + supported lists
- tests: doctor dedicated-skip test now uses exact-name checks so
  Bearer-authed Anthropic-COMPATIBLE gateways (CommandCode (Anthropic))
  are allowed in the generic loop while native anthropic stays skipped

E2E verified with real imports: profile registration, aliases,
PROVIDER_REGISTRY auto-extension, bearer-auth host match
(positive + negative), live /models fetch (55 models).
@alt-glitch alt-glitch added type/feature New feature or request comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/cli CLI entry point, hermes_cli/, setup wizard comp/plugins Plugin system and bundled plugins area/config Config system, migrations, profiles P3 Low — cosmetic, nice to have sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades labels Aug 17, 2026
…r desktop parity

The provider-parity contract requires every CANONICAL provider to render a
card on the desktop Keys tab. /api/env rows are keyed by env var, and both
CommandCode profiles shared the single COMMANDCODE_API_KEY — so the
commandcode-anthropic profile had no row of its own and
test_provider_parity failed on CI (slice 6/12).

Fix: both profiles keep the shared API key, but each declares its own
base-URL override var (COMMANDCODE_BASE_URL / COMMANDCODE_ANTHROPIC_BASE_URL),
matching the sibling-provider pattern, so each renders its own card.

Verified: test_provider_parity.py + commandcode + providers suites green
locally (86 passed); PROVIDER_REGISTRY splits key vs base-URL vars correctly
for both profiles.
@teknium1
teknium1 merged commit 9adc607 into main Aug 17, 2026
45 checks passed
@teknium1
teknium1 deleted the feat/commandcode-provider branch August 17, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/cli CLI entry point, hermes_cli/, setup wizard comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants