Repository navigation
Merged
Conversation
…el first, refusals with their ways forward, session notices (D3.16)
- types: PickModel.plan (free, within_ceiling, pro_and_max) and the
wallet's new fields (granted and paid credit, free_model, network,
credit_request, included_hours_withheld).
- orca models: a plan column ("free model", "Pro and Max") where the
server marks a model; plain rows gain the mark as a fourth column.
- agents create with no model: on Free the picker lists the free model
the server marks first and preselects it; picker rows carry the mark.
- Refusals (model_not_in_plan, free_plan, free_model_daily,
free_model_capacity, included_hours, free_model_unavailable): the
server's message as it is, then the dashboard's ways forward as words
with the command for each, exit 1 (a 403 there is the plan's answer,
not the key's role). Where the free model is one, the chat switch in a
terminal lists it first; included_hours offers no switch of model.
- chat: orca.compute.warning, orca.free_model.turn_limit,
orca.turn.time_limit and orca.network.off print on stderr (network as
"network off. <message>"), in the REPL transcript, and pass through
--json as raw events.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, the network and more credit lines; MCP descriptions (D3.16) - orca billing wallet at a terminal prints the design's lines: one "granted credit $12.40 left of $20.00, expires 4 Dec 2026" per grant (its last day, the day before expires_at), "paid credit $18.20 (never expires)", "machine time 1 h included: 0.4 h used, resets 1 November" (or "used"), "free model 40 of 100 calls today", "network off. ..." and on Free "more credit ..." in the server's words. - Plain mode adds granted_credit, paid_credit, one grant row each (left, granted, last day), expired, free_model_calls_today and _per_day and network_off; the network and more credit messages go to stderr. --json passes every field through. - MCP list_models names plan, get_wallet names the new fields. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd paid credit (D3.16) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… params, the withheld lines (D3.16, orca-design #133) - The wallet's free-model count is read from free_model_today; the wallet's free_model stays the plan facts' model list. - rate_limit_exceeded with param free_model_busy (try again in a minute, or add your own OpenRouter key), turns_per_day (more at 00:00 UTC, or upgrade) or free_sandboxes_busy (try again in a few minutes, or upgrade): the server's message plus those ways forward. Other rate limits are unchanged. - With included_hours_withheld, orca billing wallet prints "machine time not included for this organization" and "Free's included hour and free model are not available for this organization. Add credit, or bring your own provider key." (plain: a row and the line on stderr). - MCP get_wallet, README and use-orca name the new field and params. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… switch A4: orca models and the pickers mark the free models on every plan; agents create puts the free model first and preselects it on Free only; the wallet prints the free model's calls today on every plan with a share; the MCP list_models and get_wallet descriptions, the README and use-orca say so. A5: a 403 model_not_in_plan on one of Orca's free models is a plan with no share, told from Free's ceiling by the session's model, and prints the server's message with the OpenRouter key way; the 503 free_model_unavailable off message prints as the server wrote it; the calls today line is left out while the free models are off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…page for each plan's free-model share Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fer your own OpenRouter key or credit, and a suspension's 403 is the server's message Upgrading gives no more of the capacity every tier shares, so neither refusal offers it. free_model_daily's three messages are printed as sent. A 403 organization_suspended on a start or an upload is no longer read as the key's role: it is the server's message, exit 1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hy a sandbox slept orca chat prints orca.sandbox.discarded and orca.sandbox.workspace_near_limit on stderr as it prints the other notices. orca sessions sleep prints the last sleep's note under its line: the server's message (a workspace near Free's size, a discarded one), else the words for suspended and network_on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… it is on with sandboxes still without it, and no free model line on a null share The network line is "on." and the server's message while running sandboxes started without the network, with a sandboxes_without_network row in plain output; get_wallet's description names the field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ade, the suspension, the workspace notices and the network once on Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t their own switch, never a top-up 1: model_not_in_plan is no longer an Orca credit refusal. A model that needs Pro or Max asks "Upgrade, or switch this session?" with the free model first; declining says to upgrade. A free model on a tier with no share offers no switch: the server's message and its ways. 4: free_model_unavailable offers the switch to the next free model only when GET /api/models lists one (amendment A3 (3)); with none listed (A5, the free models off) it prints the server's message with the OpenRouter key and credit ways. The message is sent again after the switch. 5: included_hours offers no "Add credit" of its own: credit buys machine time only while Free has a rate (A6 (15)), and the server's message says so exactly when it does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…last slept
sessions get already reads GET /api/sessions/{id}/sandbox for its state;
the view now keeps last_sleep too. The plain and panel output add the
sleepNote line (a discarded or near-limit workspace with the server's
message, a suspension, the network turned on), and --json carries
last_sleep as the server sent it, in the object it already prints.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… in copy, a kept-objects limit is exit 1 3: the README's notices no longer say "5 minutes" or "Free's 30 minutes", and no copy or comment says "included hour" or "30 minutes"; the numbers are the server's. 5: a 403 object_limit_exceeded (sessions stored, F33, and the other object caps) prints the server's message as it is, exit 1, as a suspension does, not "not allowed:" with the auth exit code. Exit 1 is the README's "API error"; the exit-code table is unchanged. WITHHELD stays a copy of the server's text, with a comment: the wallet sends only the included_hours_withheld boolean. The README and the MCP get_session description say what items 1, 2 and 4 changed: the upgrade-or-switch prompt, the next free model, last_sleep. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… user, 2026-10-22, via orca-2-prod) - Plan marks: only "free model". within_ceiling and pro_and_max stay in ModelPlan as wire values (the server sends pro_and_max only with a ceiling in Free's terms) and print nothing; the plan column appears only where a free model is listed. - model_not_in_plan: the A5 path (a :free model on a tier with no share) is unchanged; any other model the plan refuses prints the server's message with upgrade and the free model, framed as "not in the plan", never price. - README, use-orca SKILL.md and the MCP list_models description: no ceiling, no "needs Pro or Max"; other Orca credit models run on credit on every plan, Free included. - Tests: neutral server-message fixtures; Fable marked within_ceiling as the server now sends it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ahokik
marked this pull request as ready for review
October 22, 2026 14:40
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.
The CLI part of D3.16 "The Free plan" (orca-design
designs/free-plan.md, merged as 5023abd; values indesigns/limits.md): F16, F21, F32, F44, F47, "Errors" and "What a person sees" (API, CLI), with amendment A2 (orca-design #133, proposed; the build follows it).Merge condition
Merge after orca-design #133 (A2) is approved and the server's D3.16 build is merged and deployed (orca-agent-server:
planonGET /api/models, the wallet's new fields includingfree_model_today, the new refusal codes and params, and the four session events). Every new field is optional here, so against today's server the CLI behaves as before (no plan column, no new wallet lines, no words). No version bump in this PR: the repo cuts a separate "CLI vX.Y.Z" PR after a feature lands (#43 then #44, #41 then #42).Changes by file
src/lib/types.ts:ModelPlanandPickModel.plan; the wallet'sgranted_credit_micro_usd,paid_credit_micro_usd,granted_credit[](GrantedCredit),expired_micro_usd,free_model_today(WalletFreeModel, A2: the wallet'sfree_modelstays the plan facts' model list),included_hours_withheld,network,credit_request.src/lib/plan.ts(new):planWord("free model", "Pro and Max"),planColumn, andplanActions/planWords: each refusal's ways forward, the dashboard's buttons as words with the command for each, read from code and param, never the message.src/lib/api.ts:mapApiErrorprints a Free plan refusal (model_not_in_plan,free_plan,free_model_daily,free_model_capacity,included_hours,free_model_unavailable, and A2'srate_limit_exceededparamsfree_model_busy(try again in a minute, or add your own OpenRouter key),turns_per_day(more at 00:00 UTC, or upgrade) andfree_sandboxes_busy(try again in a few minutes, or upgrade)) as the server's message, then its ways forward, exit 1. Other rate limits are unchanged. A 403model_not_in_planis the plan's answer, so it no longer reads as the key's role (exit 3), and a 503free_model_unavailableno longer says "try again in a moment".src/lib/models.ts: picker rows carry the plan mark;freeModels(the Orca credit models the server marksfree, which it does only on Free) andfreeFirst;modelRowskeepsplanfor MCP;creditOutoffers the switch formodel_not_in_planand none forincluded_hours(machine time, which no switch of model pays for);refusedAtAdmissioncoversmodel_not_in_plan;offersFreeModel.src/commands/models.tsx: aplancolumn on Orca credit models where the server marks one (none on Pro and Max); plain rows gain the mark as a fourth column (-when none).src/commands/agents.tsx:agents createwith no model, at a terminal: on Free the free model is listed first and preselected.src/commands/chat.tsx,src/ui/Chat.tsx,src/ui/SwitchPrompt.tsx: refusals and Free stops print the server's message and the ways forward as words (single turn: on stderr under the error; REPL: a note). Where "switch this session to the free model" is one (model_not_in_plan,free_plan), the existing switch lists the free model first, preselected, labelled "Switch this session to the free model or your own key". Session notices print on stderr (single turn) or in the transcript (REPL).src/lib/sessions.ts:noticeTextand anoticechat event fororca.compute.warning,orca.free_model.turn_limit,orca.turn.time_limit,orca.network.off(the network one asnetwork off. <message>);--jsonpasses them through as raw events.src/lib/format.ts:formatDayMonth("1 November"),formatDayShort("4 Dec 2026"),formatHours(to a tenth, rounded down).src/lib/wallet.ts(new),src/ui/WalletView.tsx,src/commands/billing.tsx:orca billing walletprints the design's lines:granted credit $12.40 left of $20.00, expires 4 Dec 2026per grant (its last day:expires_atis 00:00 UTC the day after),paid credit $18.20 (never expires),machine time 1 h included: 0.4 h used, resets 1 November(orused),free model 40 of 100 calls today(fromfree_model_today, A2),network off. <message>, and on Freemore credit <message>, both messages the server's. Withincluded_hours_withheld(A2):machine time not included for this organizationand the line "Free's included hour and free model are not available for this organization. Add credit, or bring your own provider key." Plain mode addsgranted_credit,paid_credit, onegrantrow each (left, granted, last day),expired,free_model_calls_today,free_model_calls_per_day,network_off,included_hours_withheld, with the messages on stderr.--jsonpasses every field through.src/mcp/server.ts: thelist_modelsdescription namesplanand its values;get_walletnames every new field.README.md,plugins/orca/skills/use-orca/SKILL.md,references/cli-cheatsheet.md: the plan marks, the Free refusals and notices, granted and paid credit.test/lib/plan.test.ts(new),test/lib/models.test.ts,test/lib/sessions.test.ts,test/api.test.ts,test/format.test.ts,test/commands/{models,agents,chat,billing}.test.ts,test/ui/{Chat,WalletView}.test.tsx,test/mcp/server.test.ts.For the server build to check
free_model_today(A2, #133), so it no longer collides with the plan facts'free_modelthe wallet carries (src/api/billing.rs:74-95).agents createcomes fromGET /api/models(plan: "free", the server's per-tier mark from its free-model list), not fromGET /api/public/plans, which does not know the caller's tier; no extra request.{type, message, at}and shown whatever turn they belong to.D6.7 (A1, F37): left for #54
orca-cli #54 (
sandbox-sleep) is not merged, so its files are untouched. When it is, the change is:src/lib/types.tsSandboxSleep.outcome: add'discarded'(at a money or hours stop on Free the snapshot failed and the compute was deleted anyway;statereadsnone).src/lib/sessions.tssleepFailure: already returnslast_sleep.messagefor any outcome other thanasleepor null, sodiscardedprints the server's message ("The workspace was larger than the 100 MiB Free keeps, so it was not saved." or "The workspace could not be saved, so it was not kept."); its comment namesdiscarded.orca sessions get: orca sessions sleep: put a session's sandbox to sleep now (D6.7) #54 keeps onlystate; keeplast_sleeptoo and, when its outcome isdiscarded, print its message on the sandbox line, so the person is told the workspace was not saved.get_sessionand the sleep tool's description namediscarded; adiscardedfixture intest/lib/sessions.test.tsandtest/commands/sessions.test.ts.Checks (local; CI minutes are used up)
npm run typecheck: passnpm run lint: passnpm test: 42 files, 556 tests passed (512 before)npm run build: build successA6 and A7 (approved by the user 2026-10-21; head a81fdbe)
All amendments A1 to A7 are approved and merged in orca-design (A6 #139 at bf2f489, A7 #140 at 4e33b84).
organization_suspendedprints the server's message, exit 1 (was "not allowed" with the auth exit code), also inorca chat.orca chatprints both workspace events on stderr like the other notices.orca sessions sleepshows thesuspendedandnetwork_onreasons; F37'sdiscardedoutcome is typed and not treated as a failure.orca billing walletprintsnetwork on. <message>while running sandboxes lack the network, plus asandboxes_without_networkrow; a nullfree_model_todayprints no line.Checks:
npm run typecheckclean;npm run lintclean;npm test596 passed (42 files);npm run buildsuccess;bun scripts/build-binary.ts bun-darwin-arm64built, prints 1.5.0.Review round 1 (orca-2-prod), head f46aa9e:
model_not_in_planis no longer a credit refusal. On Pro or Max models it asks "Upgrade, or switch this session?", never "Top up".free_model_unavailableoffers the switch to the next free model only while/api/modelslists one. Under A5's empty list it prints the server's message.included_hourshas no client "Add credit" action: the server's message offers credit exactly when Free has a rate.orca sessions getprintslast_sleep's words (discarded, near limit, suspended, network on), and--jsonand MCPget_sessioncarrylast_sleep.object_limit_exceededprints the server's message with exit 1, not "not allowed:" with the auth exit code.included_hours_withheld. It is commented.orca.sandbox.discardedfrom the restart inside that post reachesorca chat. A discard written at a drain after the stream closed shows onorca sessions get.Checks at f46aa9e:
tsc --noEmit: exit 0.eslint .: exit 0.vitest run: 610 passed (42 files).npm run build: success.Landing on 2026-10-22 (server #93 live as 8bec828), head ac33318
This section supersedes the ceiling lines above: Free's price ceiling is gone (D3.16 A9, orca-design #153), live since 2026-10-22T13:55:24Z.
Merge of main: none needed; the branch already contained main (cadc2dd).
Live fields:
orca billing walletandorca models --payer orca, run from this head against production with the test key (read-only GETs), print the wallet lines, the grant row, the free-model calls and the "free model" mark as sent.usage_limit_exceededwithorca_credit,free_model_capacity,included_hoursandorca_suspended; the six session event types.Free price ceiling removed (A9), 81fdef7, ac33318:
within_ceilingandpro_and_maxstay as wire values and print nothing. Theplancolumn shows only when a free model is listed.list_modelsdescription no longer mention a ceiling, "needs Pro or Max" orpro_and_max.model_not_in_planis described as the A5 case only (a tier with no free-model share).model_not_in_planpath keeps the server's message, Upgrade and the switch to the free model. The server sends it only if Free's terms set a ceiling again.within_ceiling, as the server now sends it.Checks at ac33318 (local):
npm ci: ok.npm run lint: exit 0.npm run typecheck: exit 0.npm test: 610 pass in 42 files.Release: merging does not release.
release-cli.ymlruns only on a pushedcli-v*tag (or by hand), and the version stays 1.5.0.🤖 Generated with Claude Code