Skip to content

Commit 8ed38f8

Browse files
fix: key explicit picks unambiguously
Provider and model IDs can contain slashes, so joining them with one could let two different picks share a key. Encode the pair as JSON. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_016x3nbZU5Vb6HnSTqE7vELm
1 parent e31844d commit 8ed38f8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎packages/tui/src/context/local.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
615615
// of these, so switching conversations or agents cannot reroute a deliberate choice. See R8
616616
// for restarts. Declared before `fallbackModel`, which reads it as soon as it is created.
617617
const [explicitPicks, setExplicitPicks] = createStore<Record<string, true>>({})
618-
const pickKey = (model: { providerID: string; modelID: string }) => `${model.providerID}/${model.modelID}`
618+
const pickKey = (model: { providerID: string; modelID: string }) => JSON.stringify([model.providerID, model.modelID])
619619
// altimate_change end
620620

621621
const fallbackModel = createMemo(() => { // altimate_change

0 commit comments

Comments
 (0)