Skip to content

feat: Prometheus — CommandCode provider, api_mode=responses, goal migration, Honcho prune, profile routing - #33884

Closed
ousiaresearch wants to merge 1 commit into
NousResearch:mainfrom
ousiaresearch:feat/rebased-prometheus
Closed

feat: Prometheus — CommandCode provider, api_mode=responses, goal migration, Honcho prune, profile routing#33884
ousiaresearch wants to merge 1 commit into
NousResearch:mainfrom
ousiaresearch:feat/rebased-prometheus

Conversation

@ousiaresearch

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds six features (previously blocked by GitHub push issues) rebased onto current upstream HEAD:

Related Issue

Fixes #33600, #33618, #33376, #33174, #33548, #33436

Type of Change

  • ✨ New feature (non-breaking change that adds functionality)
  • ✅ Tests (adding or improving test coverage)

Changes Made

  • New files:
    • plugins/model-providers/commandcode/ — provider plugin (4 files)
    • tests/providers/test_commandcode_profile.py — test coverage
  • Modified files:
    • run_agent.py — added responses api_mode branch in _call(), import _normalize_responses_to_chat
    • agent/codex_responses_adapter.py — added _normalize_responses_to_chat() for generic Responses API
    • agent/account_usage.py — added Nous credit fetch + connectivity fallback
    • hermes_cli/runtime_provider.py — added "responses" to _VALID_API_MODES
    • hermes_cli/goals.py — added migrate_goal() function
    • gateway/run.py — fallback notification callbacks, migrate_goal() at 3 session rotation sites, _load_profile_routing(), _resolve_profile_for_user(), _set_fallback_status_callback(), _gateway_extra_flag(), _notify_fallback_used()
    • gateway/platforms/base.py — added target_profile field to MessageEvent
    • plugins/memory/honcho/cli.py — added cmd_prune() with --dry-run, --force, --include-active
    • plugins/memory/honcho/client.py — added prune_enabled and prune_max_age_days config fields
    • tests/providers/test_plugin_discovery.py — added "commandcode" to required providers

How to Test

  1. CommandCode plugin: pytest tests/providers/test_commandcode_profile.py tests/providers/test_plugin_discovery.py
  2. api_mode=responses: Configure a custom provider with api_mode: responses in config.yaml, send a message — verify tool calls and text work
  3. Goal migration: Set a /goal, let session compress — verify goal survives session_id rotation
  4. Fallback notification: Enable fallback_notifications in gateway.extra, force primary provider to fail — verify notification
  5. Profile routing: Add profile_routing: {"<user_id>": "<profile>"} to config.yaml — verify message routes to correct profile
  6. Honcho pruning: hermes honcho prune --dry-run — verify stale session list, then hermes honcho prune --force

Checklist

  • I have tested these changes locally
  • I have written or updated tests
  • My changes follow the project code style
  • I have read the CONTRIBUTING guidelines

CommandCode provider + bug fixes + features rebased onto current upstream
(commit 4695d27):
- CommandCode provider plugin (plugins/model-providers/commandcode/)
- api_mode='responses' support for generic Responses API (NousResearch#33600)
- _normalize_responses_to_chat() in codex_responses_adapter.py
- Nous Portal usage/credits tracking (NousResearch#33376)
- migrate_goal() for session_id rotation (NousResearch#33618)
- Fallback provider notification (NousResearch#33174)
- Per-user profile routing (NousResearch#33548)
- Honcho session pruning command (NousResearch#33436)

Adapted for upstream refactoring:
- run_agent.py: responses api_mode branch in _call()
- codex_responses_adapter.py: _normalize_responses_to_chat
- gateway/run.py: fallback_notify, migrate_goal at 3 rotation sites
- gateway/platforms/base.py: target_profile field
- plugins/memory/honcho/: cmd_prune + HonchoClientConfig prune fields
- Removed agent/chat_completion_helpers.py modifications (upstream
  deleted the file — code moved to transports/ and run_agent.py)
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/gateway Gateway runner, session dispatch, delivery comp/cli CLI entry point, hermes_cli/, setup wizard comp/plugins Plugin system and bundled plugins area/config Config system, migrations, profiles provider/nous Nous Research API (OAuth) tool/memory Memory tool and memory providers labels May 28, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Mega PR bundling 8 features, each also submitted as individual PRs: #33886 (CommandCode), #33889 (api_mode=responses), #33888 (Nous usage), #33890 (goal migration), #33891 (fallback notification), #33892 (profile routing), #33893 (Honcho prune). CommandCode portion duplicates existing #32909. Goal migration competes with #33620, #29955, #18749, #18427. Profile routing competes with #33558. api_mode=responses competes with #33604, #33637, #33765.

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/gateway Gateway runner, session dispatch, delivery comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have provider/nous Nous Research API (OAuth) tool/memory Memory tool and memory providers type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

provider: custom always appends /chat/completions to base_url, ignoring api_mode

3 participants