feat: add CommandCode provider plugin - #32909
Conversation
49b0e94 to
52829ea
Compare
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)
52829ea to
bf8e6e9
Compare
|
Thanks for the CommandCode provider-profile work. This is an automated hermes-sweeper review closing the in-tree placement under the standing third-party integration policy.
Closed as not-planned per standing maintainer policy ( |
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).
|
Merged via PR #88308 — your commit was cherry-picked onto current main with authorship preserved in git history. Thanks for the clean implementation: both profiles, live model fetch, and the test suite all survived intact (all 28 of your tests still pass against CommandCode's current API). We added setup/doctor/dump wiring, docs, and a per-profile base-URL split for desktop parity on top. |
Follow-ups on top of the salvaged CommandCode provider plugin (PR NousResearch#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).
What does this PR do?
Adds a first-class CommandCode provider plugin with two API-mode profiles (
chat_completionsandanthropic_messages) backed by 20+ models through a single API key. This removes the need to configure CommandCode as a YAML-onlycustom_provider— it is now a fully registered provider auto-discovered at startup and available in/modelpickers and setup wizards.Related Issue
None — new provider inclusion.
Type of Change
Changes Made
plugins/model-providers/commandcode/__init__.py—CommandCodeProfile(chat_completions, 20+ models) andCommandCodeAnthropicProfile(anthropic_messages, Claude models), both withfetch_modelsplugins/model-providers/commandcode/plugin.yaml— manifestagent/anthropic_adapter.py— recognizeapi.commandcode.aias a Bearer-auth domain in_requires_bearer_auth()(+1 line)tests/plugins/model_providers/test_commandcode_profile.py— 28 unit teststests/providers/test_plugin_discovery.py— bump profile count assertion 34→36How to Test
COMMANDCODE_API_KEYin.env./venv/bin/python -m pytest tests/plugins/model_providers/test_commandcode_profile.py tests/providers/ -vpython -c "import providers; p = providers.get_provider_profile('commandcode'); print(p.name, p.api_mode)"Checklist
Code
pytest tests/and all tests passDocumentation & Housekeeping
cli-config.yaml.example— N/ACONTRIBUTING.mdorAGENTS.md— N/Aurllib, no platform-specific code)