Repository navigation
WO-03: per-Dot model and desk key (stacked on #1) - #2
Merged
Merged
Conversation
…S_API_KEY_<DESK> with X-Cadis-Desk, no fallback (WO-03) Adds nullable model and desk to Dots with a UI/API setter (PUT /api/dots/:id/model, and in the Dot dialog). Resolution: dot.model, then OPENAI_MODEL, then cadis-free; a desk Dot uses only CADIS_API_KEY_<DESK> and fails with 'Model not configured' when it is empty. Applied in DotAgent (Intelligence path) and the direct-model path. Precedence ported from RoseBludd/hermes cron/scheduler.py.
This was referenced Oct 16, 2026
RoseBludd
added a commit
that referenced
this pull request
Oct 16, 2026
WO-02: per-Dot memory scope and seat import (stacked on #2)
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.
WO-TWIN-03: per-Dot model selection
Stacked on #1 (WO-07). Base:
devvy/wo-07-direct-model, because the direct-model path also needs per-Dot resolution. Once #1 merges, retarget this PR todevvy/host-base-timeouts. The only commit here is4b8a888.No edits to
runner.ts,store.ts,tools/mcp/**orhandoff/**.What changes
modelanddeskcolumns, added throughWorkspaceStore's existing additive column migration.setDotModel()is the only new store method.src/shared/dot-model.ts):cadis-free,cadis. Desk names must match^[a-z0-9][a-z0-9-]{0,31}$and map to envCADIS_API_KEY_<DESK>, with-becoming_.src/server/dot-model.ts,resolveDotModel):dot.model, thenOPENAI_MODEL, thencadis-free.CADIS_API_KEY_<DESK>, plus the headerX-Cadis-Desk: <desk>. If the key is empty, it throwsModel not configured for desk "<desk>": set CADIS_API_KEY_<DESK> on the server. This Dot does not fall back to another key.The shared key and the fallback model are never used for a desk Dot.OPENAI_API_KEY, which is today's behavior.dot-agent.ts: only the model-resolution lines change (the config check andopenaiCompatibleText(model, {apiKey, defaultHeaders})). With no desk and no model set, the result is identical to before.direct-model:DirectModel.modelFor(dotId). A desk Dot never usesOPENAI_FALLBACK_MODEL, since a desk key is scoped to its own models.PUT /api/dots/:id/model {model?, desk?}, available in both Intelligence and direct-model modes.POST/PUT /api/dotsalso acceptmodel/desk.CADIS_API_KEY_<DESK>values later (Infisical/host/opendots).Reused components (cited)
vendor/hermes-agent/cron/scheduler.pyL1358 (job.get("model") or os.getenv("HERMES_MODEL")) and L1493–1514 (a per-job provider resolves or fails with a clear error)dot.model → OPENAI_MODEL → default, and failing clearly with no fallback. Note: the WO namesscheduler_provider.py, but that file holds the cron trigger provider, so the model logic was taken fromscheduler.py.src/server/dot-agent.ts(openaiCompatibleText,resilientFetch)RoseBludd/cadis-ai-gatewayPR #4 (CADIS_DESK_KEYSsha256 map, desk scope by model)X-Cadis-Desknames the desksrc/server/workspace.tsadditive column migrationmodel/deskcolumnsAcceptance and proof (
tests/dot-model.test.ts, 8 tests)uses the server key and model for a Dot without a desk,uses the desk key and X-Cadis-Desk header per Dotfails clearly with no fallback when the desk key is empty,returns "Model not configured" without calling the model when the desk key is empty(the stub is never called)sends the Dot model, desk key and X-Cadis-Desk header(stub HTTP server)rejects models outside the allowlist and bad desk namespersists model and desk on a Dot, including after reopening the databasemaps desk names to env namesResults:
tscclean, build OK, eslint has only the base's 10 errors.