Repository navigation
fix(list-models): report unauthenticated on keyless DSH and Pi SDK - #1105
Merged
stamp-build[bot] merged 3 commits intoNov 21, 2026
Merged
Conversation
Contributor
Author
|
CHANGES @ ee3fecd The DSH fix is right: it reads only the native catalog, keeps provider failures as
Everything else is fine as is.
|
stamp-build
Bot
deleted the
agent/lookout/list-models-unauthenticated
branch
November 21, 2026 09:13
Contributor
Author
|
New failure in post-merge full tests: workflow Newly failing:
It could be any of PR 1102, PR 1103, PR 1105. Please fix. See logs: |
stamp-build Bot
added a commit
that referenced
this pull request
Nov 21, 2026
<!-- stamp:review:v1 --> <sup><img src="https://api.raft.build/api/avatars/pixel/bXVn.svg" width="16" height="16" align="absmiddle" alt=""> <b>Cindy</b> from open-agent-runtime opened this pull request through Stamp</sup><br><sup><a href="https://stamp.build/review?receipt=prc_181cd54194df4f34ad7de17509f925dc"><picture><source media="(prefers-color-scheme: dark)" srcset="https://stamp.build/assets/brand/stamp-glyph-dark.d907ffcadb44.svg"><img src="https://stamp.build/assets/brand/stamp-glyph-light.58a2c10ed108.svg" width="13" height="12" align="absmiddle" alt=""></picture> View in Stamp →</a></sup> --- <!-- /stamp:review:v1 --> ## OAR 0.128.0 ### Behavior changes hosts should know - **`turn_ended` is the last event of its turn** (#1101). In a frame that closes a turn, usage and context reports now come before `turn_ended`, and nothing follows `turn_ended` in that frame unless a `turn_active` opens the next turn first. Before, Claude, Qwen, Qoder and the other shared stream-json runtimes, the ACP runtimes, and Pi (SDK and RPC) could put the closing usage after `turn_ended`; Pi also put a refused input's report after its command events. The scripted test runtime follows the same order. Reports that arrive in a later frame (Kimi `usage_update` after its bounded wait, the Qwen and Factory context reply after its one-second bound) are recorded where they arrive and folded into `usage()` and `contextUsage()`; they are not attached to the turn that already ended. Hosts that treated `turn_ended` as "this turn's data is complete" get the closing usage earlier; hosts that read usage only from events after `turn_ended` must read it from the same frame instead. The rule is in docs/spec/record-stream.md. - **`listModels` reports `unauthenticated` instead of an empty list when credentials are missing** (#1105). - DSH with no DeepSeek key used to answer `ok` with no models. It now answers `unauthenticated`, and the detail names the default route (`deepseek-official/deepseek-flash`) and says to configure credentials for it. With a key, the list is unchanged (`deepseek-flash`, `deepseek-v4-pro`). - The in-process Pi SDK answers `unauthenticated` when no provider has credentials but Pi's catalog is not empty, naming the saved default when there is one. Pi RPC exposes only the available models, so it keeps `ok` with an empty list (documented in docs/runtimes/pi.md). - All 17 built-in and community runtimes were probed signed out on real installs; only DSH and Pi SDK changed. ### New - **`SessionOptions.sessionLogUpload: "off"`** (#1106). This option stops the runtime from sending the session's transcript or log to its vendor outside the model requests themselves. Leaving it out keeps the user's and runtime's own settings. There is no `"on"`, and when given it wins over a user opt-in. Separate telemetry metrics are out of scope. Give it again on resume. - DSH (0.2.1-rc.5 and later): DSH's bundled `session-log-deepseek` plugin is on by default and attaches pending session events (system prompt, messages, reasoning, tool calls, images; up to 8 MiB per request) to every request on official DeepSeek routes. With the option, OAR's private launch patch sets `enabled: false`, and the bridge confirms the setting took effect before any agent or model request starts; if it cannot confirm, the open fails with `UnsupportedOptionError("sessionLogUpload")`. Verified on DSH 0.2.2-rc.5 for root turns, native subagent children and resumed sessions, including over a user `enabled: true`. DSH's `DSH_TELEMETRY_DISABLED` does not stop this upload. Official requests also carry a separate plugin inventory field (`dsh_plugin_packages`) that this option does not cover. See docs/runtimes/dsh.md "Session-log upload". - Every other runtime refuses the option with `UnsupportedOptionError` (`refusedSessionOptions.sessionLogUpload`) until a switch is verified for it. - This adds a key to `RefusableSessionOption`, so exhaustive switches over that type need a case. ### Docs - README has a Contributing section (#1102, #1103): issues and pull requests from people and agents are welcome, issues preferred. AI-written contributions need no human manual check if the AI verified them in a real environment. Projects using both Raft and OAR can ask [email protected] for a joint channel. - docs/runtimes/dsh.md notes that DSH's auxiliary web-search model calls report no usage, so `usage()` cannot count them. ### Tests and CI - The push matrix on `main` keeps the jobs an audit showed to guard contracts; the remaining platform legs run in a daily sharded matrix, and tests that checked no contract were removed (#1100). The commit gate in docs/development.md is `CI=1 pnpm run check`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Cindy <[email protected]>
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.
Summary
Fix
dshListModelsand Pi SDKlistModelsso neither returns{ kind: "ok", models: [] }when native evidence shows the empty list is caused by missing credentials:packages/oar/src/runtimes/dsh/list-models.ts): when all providers list zero models and the provider DSH names as itsdefaultis present with zero models and no failure, answer{ kind: "unauthenticated", detail }naming that default provider.packages/oar/src/runtimes/pi/list-models.ts): whenmodelRuntime.getAvailable()is empty while the runtime's unfiltered catalog (modelRuntime.getModels()) is non-empty, answer{ kind: "unauthenticated", detail }saying no provider has configured credentials and namingcreatePiProviderAuth().loginProviders().packages/oar/src/runtimes/pi/rpc/readers.ts): Pi's RPC protocol exposes onlyget_available_modelsand not the unfiltered catalog, so RPC (used in subprocess mode whenenvdiffers from the host) cannot distinguish missing credentials from an empty catalog and keeps{ kind: "ok", models: [] }(documented indocs/runtimes/pi.md).Requested by Cindy in
#core:#395following tygg's report (#oar-raft:2487cd18).Release notes
Fixes
listModelsreportunauthenticatedinstead ofok []when credentials are missing.modelslistsdeepseek-officialanddeepseek-accountwith empty model arrays and no failure while still namingdefault: deepseek-official/deepseek-flash, OAR now returns{ kind: "unauthenticated", detail }naming the default provider rather than{ kind: "ok", models: [] }.env), whenmodelRuntime.getAvailable()returns no models whilemodelRuntime.getModels()is non-empty, OAR now returns{ kind: "unauthenticated", detail }naming missing provider credentials andcreatePiProviderAuth().loginProviders()rather than{ kind: "ok", models: [] }. Pi RPC with a changedenvremainsok []because Pi's RPC protocol exposes onlyget_available_models.Cross-runtime signed-out / keyless probe table (2026-11-21)
Every built-in runtime (15) and community runtime (2) was probed on a real install on Linux x64 in a fresh isolated
HOME(plus runtime-specific isolated homes such asDSH_HOME,GROK_HOME,OAR_PI_AGENT_DIR,MISTER_MORPH_FILE_STATE_DIR) with all provider API keys stripped and no real accounts or paid calls.listModelsresultantigravityagy 1.5.14session/newreturns JSON-RPC-32000(Authentication required){ kind: "unauthenticated", detail: "Authentication required" }unauthenticated)claude2.1.292 (Claude Code)control_requestlist_modelsreturns 5 models (default,opus,fable,sonnet,haiku){ kind: "ok", models: [5 entries] }codebuddy2.173.0session/newreturns JSON-RPC-32000(Authentication required,data.category: "auth"){ kind: "unauthenticated", detail: "CodeBuddy requires authentication" }unauthenticated)codexcodex-cli 0.170.0model/listreturns 11 models withisDefault: trueongpt-6.2-sol{ kind: "ok", models: [11 entries, default: "gpt-6.2-sol"] }cursor@cursor/sdk 1.4.1Cursor.models.list()throwsConfigurationError(code: "unauthenticated","API key is required for cloud operations..."){ kind: "unauthenticated", detail: "API key is required for cloud operations. Set CURSOR_API_KEY, pass apiKey, or run Cursor.auth.login()." }unauthenticated)devin3000.14.30821session/newreturns emptymodeloptions;devin auth statusreportsNot logged in.{ kind: "unauthenticated", detail: "Run \devin auth login` in a terminal or set WINDSURF_API_KEY." }`unauthenticated)dsh0.2.1-rc.5,0.2.2-rc.5modelsreturnsproviders: [{ id: "deepseek-official", name: "DeepSeek", models: [] }, { id: "deepseek-account", name: "DeepSeek Account", models: [] }]anddefault: { provider: "deepseek-official", model: "deepseek-flash" }(nofailure). With syntheticDEEPSEEK_API_KEY,deepseek-officiallistsdeepseek-flash(default) anddeepseek-v4-pro(0.2.2-rc.5) with efforts and zero network requests.{ kind: "ok", models: [] }. After:{ kind: "unauthenticated", detail: "DSH default provider \"deepseek-official\" (deepseek-official/deepseek-flash) listed no models; configure credentials for deepseek-official." }factorydroid 1.17.0droid.list_modelsreturns 82 models without login{ kind: "ok", models: [82 entries] }grokgrok 1.0.92_x.ai/models/listreturnscurrentModelId: "grok-4.6",availableModels: [grok-4.6, grok-4.5]without login (grok auth statusconfirms signed out){ kind: "ok", models: [2 entries, default: "grok-4.6"] }kimi2.1.1session/newreturns JSON-RPC-32000(Authentication required){ kind: "unauthenticated", detail: "Authentication required" }unauthenticated)opencode(v1)1.18.30opencode models --verbosereturns 7 freeopencode/*models{ kind: "ok", models: [7 entries] }opencode(v2)opencode v2.2.7opencode models --standalonereturns 12 freeopencode/*models{ kind: "ok", models: [12 entries] }pi(SDK)@earendil-works/pi-coding-agent 1.5.2modelRuntime.getAvailable()returns[]whilemodelRuntime.getModels()returns 1,643 built-in models (andpi --list-modelsprints"No models available. Use /login to log into a provider via OAuth or API key."){ kind: "ok", models: [] }. After:{ kind: "unauthenticated", detail: "No Pi provider has configured credentials; configure a provider API key or sign in via createPiProviderAuth().loginProviders()." }pi(RPC)@earendil-works/pi-coding-agent 1.5.2get_available_modelsreturns{ success: true, data: { models: [] } }; RPC protocol (RpcCommand) exposes no unfiltered catalog command{ kind: "ok", models: [] }when invoked via RPC (changedenv); unchanged-envsubprocess mode routes to SDK and returnsunauthenticateddocs/runtimes/pi.mdpi-durable@earendil-works/pi-durable 1.5.2createModels()returnsgetModels() === []{ kind: "ok", models: [] }docs/runtimes/pi-durable.md, an empty host catalog isok [])qoderqodercli 1.1.78qodercli status --output jsonreturns{ "logged_in": false, "version": "1.1.78", "allow_byok": 0 }{ kind: "unauthenticated" }unauthenticated)qwen0.26.0"No auth type is selected...") beforeinitialize(withauthTypeset insettings.jsonand no key, exits code 1 beforeinitialize){ kind: "unauthenticated", detail: "Configure a Qwen authentication type before listing models." }unauthenticated)morphmorph 0.3.124GET /llm/profilesin fresh state dir returns{ "default": { "name": "default", "inference_provider": "openai" }, "items": [] }{ kind: "ok", models: [{ id: "default" }] }cybionlistModelsmember onCybionRuntimetypeof runtime.listModels === "undefined")listModelscapability)Known community-runtime gap (not fixed here)
0.3.124): in a fresh keyless state directory, Console'sGET /llm/profilesreturns{ "default": { "name": "default", "inference_provider": "openai" }, "items": [] }, so OAR returns{ kind: "ok", models: [{ id: "default" }] }. Thatdefaultprofile is listed even though itsopenaiprovider has no key configured and is not usable, and/llm/profilesexposes no credential or usability signal. Recorded here as a known community-runtime gap rather than changed in this PR.Call-site audit
All
listModelsimplementations acrosspackages/oar/src/runtimes/(15 runtimes) andpackages/oar/src/community/(2 runtimes) plus all DSH and PilistModelscall sites were audited:packages/oar/src/runtimes/dsh/list-models.ts: addeddshCatalogResult(catalog)and routeddshListModelsthrough it. WhenprojectDshModels(catalog)is empty andcatalog.default.providermatches a provider entry incatalog.providerswith nofailureand zero models, returns{ kind: "unauthenticated", detail }. Provider failures still returnunsupported; empty catalogs with no matching default provider remain{ kind: "ok", models: [] }; catalogs with any listed model remain{ kind: "ok", models }.packages/oar/src/runtimes/pi/model-projection.tsandpackages/oar/src/runtimes/pi/list-models.ts: added optionalgetModels?()toPiAvailabilitySource, wiredmodelRuntime.getModels()inpiModelLister, and updatedcreatePiListModelsto return{ kind: "unauthenticated", detail }whengetAvailable()is empty andgetModels()is non-empty (namingsavedDefaultif present andcreatePiProviderAuth().loginProviders()). WhengetModels()is empty or omitted, returns{ kind: "ok", models: [] }.packages/oar/src/runtimes/pi/rpc/readers.ts: documented whypiRpcModelListerremainsok [](RPC protocol has onlyget_available_models, no unfiltered catalog command).packages/oar/src/runtimes/dsh/index.ts,sea-trial/harness/backends.ts(dsh-aimock),packages/oar/src/runtimes/pi/index.ts(SDK and unchanged-envsubprocess path): delegate directly todshListModels/piModelLister, so they inherit the fixes automatically.antigravity,codebuddy,cursor,devin,kimi,qoder,qwen: already returnunauthenticatedon real signed-out installs.claude,codex,factory,grok,opencode(v1 & v2): native endpoints return populated catalogs when signed out / keyless.pi-durable: host-suppliedModelsregistry; an empty catalog reflects zero host-registered models, not missing runtime auth.morph: known community-runtime gap noted above;/llm/profileslists adefaultprofile without credential status.cybion: exposes nolistModelsmember.Changes
packages/oar/src/runtimes/dsh/list-models.ts: addeddshCatalogResultand updateddshListModelsto classify a zero-model catalog whose nameddefaultprovider listed zero models with no failure asunauthenticated.packages/oar/src/runtimes/pi/model-projection.ts,packages/oar/src/runtimes/pi/list-models.ts,packages/oar/src/runtimes/pi/rpc/readers.ts: classify emptygetAvailable()with non-emptygetModels()asunauthenticatedin Pi SDK; document Pi RPC protocol limitation.docs/runtimes/dsh.md: replaced the unmeasured placeholder under## Modelswith the measured DSH0.2.1-rc.5and0.2.2-rc.5keyless and keyed behavior and OAR'sunauthenticatedrule.docs/runtimes/pi.md: replaced the outdated"nothing configured" is an ok empty list/"An empty usable-model catalog does not establish a universal unauthenticated state"prose with the SDKunauthenticatedrule and the RPC protocol limitation.tests/fixtures/fake-dsh.mjsandtests/dsh/list-models.test.ts: added fake-executable and puredshCatalogResultunit tests covering the empty-default-providerunauthenticatedcase, provider failures (unsupported), unconfigured defaults (ok []), and populated non-default providers (ok).sea-trial/harness/dsh-aimock.ts,sea-trial/vendor/support/dsh-fixture.ts,sea-trial/vendor/dsh.vendor.test.ts: added a native DSH vendor test running against an isolated keyless home (unauthenticatednamingdeepseek-official) and the same home with a syntheticDEEPSEEK_API_KEY(okwithdeepseek-officialdefault).tests/pi/pi-list-models.test.ts: added unit tests forcreatePiListModels(with and withoutsavedDefault, plus truly empty catalogok []) and a real bundled SDK test in an isolated keyless home (unauthenticated).Verification
tests/dsh/list-models.test.ts): failed before the fix (Received: { kind: "ok", models: [] }).0.2.2-rc.5vendor test (OAR_TEST=dsh-aimock OAR_DSH_BIN=/tmp/probe-dsh/prefix/bin/dsh pnpm vitest run sea-trial/vendor/dsh.vendor.test.ts -t "isolated keyless home"): failed before the fix (Received: { kind: "ok", models: [] }).pnpm vitest run tests/pi/pi-list-models.test.ts): both failed before the fix (Received: { kind: "ok", models: [] }).0.2.2-rc.5vendor tests (sea-trial/vendor/dsh.vendor.test.ts -t "listModels"): 2/2 passed (configured route + isolated keyless/keyed home).CI=1 OAR_COMMUNITY_TESTS=1 pnpm run check && pnpm run build: passed (typecheck, oxlint 0 warnings / 0 errors, all unit + community tests includingtests/dsh/list-models.test.tsandtests/pi/pi-list-models.test.ts, mock sea-trial, build).