install into openclaw, pi, and hermes - #14
Open
DexterStorey wants to merge 6 commits into
Open
Conversation
|
try this branch: |
Third-party harnesses send standard Responses requests: system messages in the input array and max_output_tokens set. The ChatGPT codex backend rejects both. The proxy now adapts oauth-bound openai requests (system and developer messages move into instructions, max_output_tokens drops) so openclaw, pi, and hermes work without harness-specific dialects. Also ships only gpt-5.6-sol — the one model the backend accepts.
A harnesses box joins settings: green on when routed, warn off with an enter hint when installed but not routed, grey when the harness is not on the machine (binary or config detection). Enter installs or removes the providers inline — no CLI round-trip. The settings tab now windows its rows to the terminal height with more indicators, and the 2s background tick no longer holds the busy flag that was eating keypresses.
A panel cut off by scrolling keeps its title but drops its bottom border, so it reads as continuing into the more line instead of finished.
DexterStorey
force-pushed
the
harness-installs
branch
from
July 23, 2026 23:09
2f93df9 to
e5d6dce
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #11.
tokenmaxx install <openclaw|pi|hermes>adds atokenmaxx-anthropicand atokenmaxx-openaiprovider to that harness's config, pointed at the local proxy.tokenmaxx uninstall <target>removes exactly what we added, anddoctorreports each harness that exists on the machine as routed or not.Per harness, from each project's current docs and source:
models.providersin~/.openclaw/openclaw.json, with the schema-required model entries, adapters (anthropic-messages,openai-responses), and zeroed cost. We never touchagents.defaults.model; picking a tokenmaxx model stays the user's choice. If the file uses JSON5 comments, we leave it alone and print the exact block to paste, rather than eating their comments.~/.pi/agent/models.json, which pi re-reads every time/modelopens, so no restart is needed.~/.hermes/config.yamlwithapi_modeset explicitly for each endpoint, since hermes only auto-detects the mode for the anthropic host. If the config already has aproviders:mapping, we print instructions instead of writing, because yaml duplicate keys silently override and we will not stomp someone's providers.The proxy now speaks the ChatGPT backend's dialect
Config alone was not enough. Harnesses send standard Responses API requests: system prompts as messages in the
inputarray, andmax_output_tokensset. The ChatGPT codex backend rejects both (400 System messages are not allowed,Unsupported parameter: max_output_tokens). The proxy now adapts requests on the openai route for OAuth accounts: system and developer messages lift intoinstructions, andmax_output_tokensis dropped. Codex's own requests already have that shape, so the adapter is a no-op for them. API-key accounts hit api.openai.com, where the standard shape is correct, so they are left untouched.The openai provider ships exactly one model,
gpt-5.6-sol. We probed the backend live, and that is the only id it accepts for subscription accounts.Anthropic route wants an API key
Anthropic bills third-party harness traffic to extra usage rather than the plan window, and their terms do not allow subscription auth from third-party harnesses. So the anthropic provider pairs with #10's API-key accounts: add one with
tokenmaxx login claude --api-key, make it the active anthropic account, and harness traffic routes and meters against it.Tested for real
Every cell of the matrix is a live completion through the actual harness binary into the running proxy, verified against the daemon's metering:
Each run appears in
token_eventsunder the right account, so the dashboard's analytics count harness traffic like any other. An install, a live completion, then an uninstall leaves zero residue in all three configs, anddoctorshows a per-harness line for whichever of the three are installed.Unit tests cover the three writers (including the JSON5 and existing-
providers:fallbacks) and the dialect adapter.