Skip to content

feat: add CommandCode provider plugin - #32909

Closed
ousiaresearch wants to merge 1 commit into
NousResearch:mainfrom
ousiaresearch:feat/add-commandcode-provider
Closed

feat: add CommandCode provider plugin#32909
ousiaresearch wants to merge 1 commit into
NousResearch:mainfrom
ousiaresearch:feat/add-commandcode-provider

Conversation

@ousiaresearch

@ousiaresearch ousiaresearch commented May 27, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds a first-class CommandCode provider plugin with two API-mode profiles (chat_completions and anthropic_messages) backed by 20+ models through a single API key. This removes the need to configure CommandCode as a YAML-only custom_provider — it is now a fully registered provider auto-discovered at startup and available in /model pickers and setup wizards.

Related Issue

None — new provider inclusion.

Type of Change

  • ✨ New feature (non-breaking change that adds functionality)

Changes Made

  • plugins/model-providers/commandcode/__init__.pyCommandCodeProfile (chat_completions, 20+ models) and CommandCodeAnthropicProfile (anthropic_messages, Claude models), both with fetch_models
  • plugins/model-providers/commandcode/plugin.yaml — manifest
  • agent/anthropic_adapter.py — recognize api.commandcode.ai as a Bearer-auth domain in _requires_bearer_auth() (+1 line)
  • tests/plugins/model_providers/test_commandcode_profile.py — 28 unit tests
  • tests/providers/test_plugin_discovery.py — bump profile count assertion 34→36

How to Test

  1. Set COMMANDCODE_API_KEY in .env
  2. Run ./venv/bin/python -m pytest tests/plugins/model_providers/test_commandcode_profile.py tests/providers/ -v
  3. Confirm 171 tests pass (28 new, 0 regressions)
  4. Verify provider appears in discovery: python -c "import providers; p = providers.get_provider_profile('commandcode'); print(p.name, p.api_mode)"

Checklist

Code

  • I have read the Contributing Guide
  • My commit messages follow Conventional Commits
  • I searched for existing PRs to make sure this is not a duplicate
  • My PR contains only changes related to this fix/feature
  • I have run pytest tests/ and all tests pass
  • I have added tests for my changes
  • I have tested on my platform: macOS 26.3

Documentation & Housekeeping

  • I have updated relevant documentation — N/A (provider profiles are self-documenting via registry metadata)
  • I have updated cli-config.yaml.example — N/A
  • I have updated CONTRIBUTING.md or AGENTS.md — N/A
  • I have considered cross-platform impact — N/A (provider uses stdlib urllib, no platform-specific code)
  • I have updated tool descriptions/schemas — N/A

@ousiaresearch
ousiaresearch force-pushed the feat/add-commandcode-provider branch from 49b0e94 to 52829ea Compare May 27, 2026 01:09
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins labels May 27, 2026
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)
@ousiaresearch
ousiaresearch force-pushed the feat/add-commandcode-provider branch from 52829ea to bf8e6e9 Compare May 28, 2026 19:18
@teknium1

Copy link
Copy Markdown
Contributor

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.

  • The PR adds plugins/model-providers/commandcode/ and registers CommandCode profiles there (bf8e6e9fa369; plugins/model-providers/commandcode/__init__.py:84-158).
  • Current maintainer policy says vendor/SaaS integrations must ship as standalone plugin repositories rather than under this repository's plugins/ tree (AGENTS.md:126-136, AGENTS.md:797-813). This is a coupling and maintenance decision, not a judgment on the implementation.
  • The existing provider loader supports user-installed profiles at ~/.hermes/plugins/model-providers/<name>/ (providers/__init__.py:91-171). Please publish CommandCode through that standalone path and share it in #plugins-skills-and-skins.

Closed as not-planned per standing maintainer policy (in-tree-provider-integration). This is a design-direction decision, not a code-quality judgment — see the Contribution Rubric in AGENTS.md for what the project is looking for. If you believe this policy was misapplied to your change, comment here and a maintainer will take a look.

@teknium1 teknium1 closed this Jul 13, 2026
@teknium1 teknium1 added the sweeper:not-planned Sweeper: closed per standing maintainer policy (design direction) label Jul 13, 2026
teknium1 added a commit that referenced this pull request Aug 17, 2026
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).
@teknium1

Copy link
Copy Markdown
Contributor

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.

lisajlau pushed a commit to lisajlau/hermes-agent that referenced this pull request Aug 20, 2026
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have sweeper:not-planned Sweeper: closed per standing maintainer policy (design direction) type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants