Skip to content

feat: the model picker marks LiteLLM gateway models, and Pi leaves the LiteLLM launcher - #23

Merged
hyrmedia-hector merged 2 commits into
mainfrom
feat/litellm-gateway-models
Nov 5, 2026
Merged

hyrmedia-hector merged 2 commits into
mainfrom
feat/litellm-gateway-models

Conversation

@hyrmedia-hector

@hyrmedia-hector hyrmedia-hector commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

In a LiteLLM Codex or OpenCode provider, the model picker showed gateway models and the harness's own models the same way, so you could not tell which ones the gateway serves. Admins rename gateway models, so the name does not tell you either. Pi also no longer needs to run through LiteLLM.

  • Gateway models are marked. The server sets gateway: "litellm" on each model that is in the gateway's model list (lite models list). This is the same signal Claude Code uses for its "From gateway" rows: where the model came from, not its name. For OpenCode, only litellm/<id> models count, because lite opencode adds the gateway as provider litellm and the other providers stay direct. The web model picker, the model list in Settings > Providers, and the mobile model picker show a LiteLLM label on these models.
  • Pi is removed from the LiteLLM launcher. Claude, Codex, and OpenCode stay. A Pi instance that was saved with the launcher on shows as unavailable, and its settings card still shows the switch, so you can turn it off.

Proof: vp run check:changed origin/main passes (format, lint, knip, typecheck, tests). New test cases cover the gateway marking. In a dev client with a stub lite, the LiteLLM Claude models team-sonnet (an admin alias) and claude-sonnet-4-5 show the LiteLLM label in the picker and in settings, and the built-in Claude models do not. Mobile is typecheck only: this host cannot build the iOS client (no CocoaPods) or start the Android emulator (no Java).

Reviewed with sol-loop: 1 round with gpt-6.1-sol. Sol verdict: approved

Created with Claude Opus 5.5 in Claude Code (T3 Code).


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 21.5 KiB 21.5 KiB 0 B (0.0%) 24.4 KiB ✅
Codex Live turn messages 1 1 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.9 KiB 21.9 KiB 0 B (0.0%) 24.4 KiB ✅
Claude Live turn messages 1 1 0 (0.0%) 8 ✅

Baseline: aeb226f · PR result: bd1d53e · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

The LiteLLM launcher now supports Claude, Codex, and OpenCode only. Pi
had no request-tag channel and was the only user of homeEnvironment, so
both go. A Pi instance saved with the launcher on shows as unavailable,
and its settings card still shows the switch so the user can turn it off.

Claude Opus 5.5 via Claude Code.
A LiteLLM Codex or OpenCode instance lists the gateway's models beside the
harness's own catalog, and the picker showed no difference between them.
The server now sets `gateway: "litellm"` on each model whose slug is in
the gateway's model list (OpenCode: `litellm/<id>` only, because its other
providers stay direct). The web and mobile model pickers and the settings
model list show a LiteLLM label on those models.

Claude Opus 5.5 via Claude Code.
@hyrmedia-hector
hyrmedia-hector force-pushed the feat/litellm-gateway-models branch from 4332d5b to bd1d53e Compare November 5, 2026 03:38
@hyrmedia-hector
hyrmedia-hector merged commit 1a7f306 into main Nov 5, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant