feat(settings): edit omp model configuration from Settings → Models #17
No reviewers
Labels
No labels
Agent
Ignore
Agent
In Progress
Agent
Planned
Agent
Planning
Agent
Ready
Agent
Triage
Compat
Breaking
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lucas/omp-deck!17
Loading…
Reference in a new issue
No description provided.
Delete branch "implement-full-model-configuration-parity-with-omp-sdk"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This adds a Settings → Models section. It edits omp's own model configuration in the agent dir (
~/.omp/agentby default), in the same files the omp CLI reads.Model settings live in
config.yml:thinkingBudgets.*,modelRoles,modelTags,cycleOrderenabledModels,enabledProviders/disabledProviders,modelProviderOrdercompaction.modelThresholds,edit.modelVariants,task.agentModelOverridesEach setting has a structured editor, with no raw JSON or YAML anywhere: a Roles table, reorderable lists, model selector fields, and row editors for fallback chains, subagent models, compaction thresholds and edit variants. Edits collect in one Save bar that writes
config.ymlas a single validated batch.Per-model overrides live in
models.ymlunderproviders.<p>.modelOverrides.<id>. You pick a provider and a model, then set context window, max tokens, extended thinking, input types, pricing, thecompatflags andcompat.reasoningEffortMap. The file is edited as a YAML document, so comments elsewhere are kept. The SDK'sModelsConfigFileloader validates it before an atomic replace, and the model catalog reloads afterwards.Deck sessions start with the model settings from
config.yml, with path-scoped lists resolved for each session's own cwd. Saved changes are pushed into sessions that are already running.Decisions
~/.pi/agent/settings.jsonormodels.json; the real files areconfig.ymlandmodels.yml.defaultProviderandshowCacheMissNoticesdon't exist and were left out.thinkingLevelMapbecamecompat.reasoningEffortMap.cost.tiersisn't in the override schema and was left out.providers.<p>.modelOverrides.<id>, not a top-level.models[].modeltab plus the model keys the SDK has no panel for:thinkingBudgets.*,modelRoles,modelTags,cycleOrder,enabledModels,enabledProviders,disabledProviders,modelProviderOrdercompaction.modelThresholds,edit.modelVariants,task.agentModelOverrideshideThinkingBlock,expandThinkingBlocksandproseOnlyThinking. Only the TUI's interactive mode reads them.sharpshooter.model,mnemopi.*).modelPresetsis not editable. The Roles card says to manage presets with/modelpresetin the omp CLI and shows how many exist. Writes reject the key, so an unrelated save leaves the presets block untouched.modelTagsis per-role display metadata (name, theme color, hidden), not tags on models. It is edited together withmodelRolesin one Roles table, which also accepts custom roles.cycleOrderis a separate reorderable list of role ids.:levelsuffix (max/autoare only split off when the whole value isn't a catalog id)patternbadge for values outside the catalogenabledModels,enabledProviders,disabledProviders) are edited as a Global list plus one list per registered deck workspace, and written as{ path: <workspace>, models|providers: [...] }.config.ymledits, sent as a single PATCH. It shows the unsaved-change count and the note that saving rewritesconfig.ymlwithout its comments, and offers Discard all. On failure the error is shown and the drafts are kept.useBlockercovers in-app navigation, including switching Settings sections, andbeforeunloadcovers closing the tab.record/array: role selectors, tag fields and theme colors, non-empty fallback chains, known edit modes, subagent model lists, and registered workspace keys. The SDK's own validation (for example compaction thresholds) still runs afterwards.Settings.isolated, seeded with every model setting thatconfig.ymlsets explicitly (raw values; a value the SDK would reject is skipped with a warning), then re-scoped withreloadForCwd(cwd).Setting.override/clearOverride, using a new optionalAgentBridge.applyModelSettings.config.yml(tools, memory, approvals) still doesn't reach deck sessions. Repo-level omp config layers are ignored too; that is tracked as a deck inbox follow-up.modelRoles.defaultfromconfig.ymlnow picks the model a deck session uses when none is chosen.config.ymlcan't be read, sessions still start without the seeded values, and a warning is logged.Settings.loadIsolated({ agentDir, cwd: agentDir }), not the process-globalSettings.init(). The global one would also apply process-wide side effects (theme, request limits) from the user's config.GET /api/settings/modelsalso returns roles, registered workspaces, bundled agent names, the model catalog and the preset count./, soPUT /api/settings/model-overridestakesproviderandmodelIdin the body rather than in the path.Verification
bun run typecheck(protocol, server, web): pass.bun testinapps/server: 735 pass, 0 fail.model-config.test.tsnow has 14 tests. Added in the second commit:pathPrefixentry kept in place, a new workspace appendedenabledModelsfor their cwd: inside a workspace subfolder vs outside it, withtodo.reminders: falsekept. This also confirms isolated overrides accept object entries.hideThinkingBlockandmodelPresetsare refused and not listed;task.agentModelOverridesis listedmodelPresetsblock survives an unrelated write byte-for-byte and is countedmodels.ymloverride tests.bun run --filter @omp-deck/web build: pass.models.ymlwith comments kept.applyModelSettingsupdated a live session.GET /api/settings/models, after registering one workspace, returned 15 roles startingdefault, smol, slow, vision; 5697 catalog entries; agentsscout, reviewer, security-reviewer, task, sonic;presetCount0; the workspace; and entries starting with the path-scoped lists and nohideThinkingBlock. The PATCH-writes-config.ymlcheck and the manual browser check were not run. The new UI is covered only by typecheck and the production build.