Skip to content

tokenmaxx install pi - #23

Merged
DexterStorey merged 1 commit into
mainfrom
pi-install
Aug 18, 2026
Merged

tokenmaxx install pi#23
DexterStorey merged 1 commit into
mainfrom
pi-install

Conversation

@DexterStorey

Copy link
Copy Markdown
Contributor

Towards #11, replacing #14 at a smaller scope: pi only, since that is the harness actually in use.

What

tokenmaxx install pi merges a tokenmaxx-anthropic and a tokenmaxx-openai provider into ~/.pi/agent/models.json, pointed at the local proxy. pi re-reads models.json every time /model opens, so no restart is needed. tokenmaxx uninstall pi removes exactly the two providers we added and nothing else, and doctor shows a pi line whenever pi is on the machine.

An unparseable models.json is never touched: the CLI prints the exact block to add manually instead.

The proxy speaks the ChatGPT backend's dialect

Carried over from #14 unchanged: harnesses send standard Responses API requests — system prompts as messages in the input array, max_output_tokens set — and the ChatGPT codex backend rejects both. On the openai route for OAuth accounts, the proxy now lifts system and developer messages into instructions and drops max_output_tokens. Codex's own requests already have that shape, so the adapter is a no-op for them; API-key accounts hit api.openai.com and are left untouched.

Cut from #14

openclaw and hermes writers, the settings-tab harness panel, and the settings scroll machinery. The CLI plus doctor covers the pi story on its own.

Tested live

  • bun run check: 84 tests, typecheck, biome all green.
  • uninstall pi → providers gone from models.json, neighbours untouched; install pi → providers back; doctor shows ok pi.
  • Real completion through pi 0.84.2 (pi --provider tokenmaxx-openai --model gpt-5.6-sol -p) into the running daemon: answered correctly and metered under the active codex OAuth account in token_events.
  • The anthropic route was deliberately not exercised live: it pairs with an API-key account (tokenmaxx login claude --api-key) and none is registered on this machine. The provider entry and route mechanics are identical to the claude routing exercised daily.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown

try this branch: bun add -g tokenmaxx@0.0.62-alpha.93

@DexterStorey
DexterStorey merged commit fd061e4 into main Aug 18, 2026
3 checks passed
@DexterStorey
DexterStorey deleted the pi-install branch August 19, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant