agent picker: existing sessions ignore configured model variants
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start in feature/session/src/main/kotlin/ai/opencode/feature/session/SessionFeatureAgents.kt around lines 133-146, where an agent pick in an existing session updates only sessionAgents, and compare it with the draft path that calls pickingDraftAgent. Then read SessionFeatureDelivery.kt lines 316-350 to see when a model switch is sent. Done when an agent pick in an established session carries that agent's configured model and variant to the next send, and the agent-only test in SessionFeatureTestsAgentSelection.kt is updated to match.
由索引模型根据 Issue 内容生成。
描述
Summary
This is a follow-up to #202 / #210, which fixed per-agent model and reasoning-variant defaults for new-session drafts only. In an existing session, changing the selected agent does not change the model or its variant. The next send switches the agent but leaves the previous model level active, so an agent configured for #max can run at the prior agent's model and level.
Environment
- Android app: reporter's build not provided; behavior confirmed in
v0.8.8(c2311a60337e2a2128baba7c6eccb61b22bdb3f7) anddev(cab26e54c453fbaf8683ec456e628539d64b325f) source. - OpenCode server: version not provided; requires per-agent
modelvalues inopencode.jsonc. - Device/OS: not provided.
- Terminal/shell: not applicable.
- Active plugins: none required.
Reproduction
-
Configure two agents with different models and variants, for example:
{ "$schema": "https://opencode.ai/config.json", "agents": { "build": { "model": "opencode-go/deepseek-v4.1-flash#max" }, "plan": { "model": "anthropic/claude-opus-5.5" } } } -
In Android Settings › Sessions, enable Agent Selection.
-
Start a session with
buildand verify the composer shows its configured model atmax. -
In that existing session, switch the agent chip to
plan. -
Send a message.
Expected Behavior
The composer and server session switch to plan's configured model and variant. Switching back to build restores its configured max level, unless the user explicitly chooses another model for that agent.
Actual Behavior
The agent chip changes, but the model chip keeps the previous model and variant. Delivery calls switchAgent; it does not call switchModel because the agent pick created no pending model. The prompt therefore runs on the old model level.
Additional Context
- #202 covered new drafts, and merged PR #210 explicitly says “Existing sessions are unchanged.”
feature/session/src/main/kotlin/ai/opencode/feature/session/SessionFeatureAgents.kt:133-146updates onlysessionAgentswhensession != null; the draft-only path callspickingDraftAgent.- Per-agent manual model memory is also draft-only (
SessionFeatureAgents.kt:45-48,277-289). SessionFeatureDelivery.kt:316-350switches the agent first and switches a model only whenpending.modelis non-null.- Existing-session tests assert an agent-only request sequence (
SessionFeatureTestsAgentSelection.kt:241-287). - Suggested acceptance checks: switch away and back in an established session, configured variant propagation, explicit user model picks, and agent/model request ordering on the next send.
- Static source reproduction only; no device screenshot or log was provided.
- 主要语言
- Kotlin
- 星标
- 146
- 派生
- 35
- 平均合并
- 7 小时 41 分钟
- 30 天内合并 PR
- 221
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
anomalyco/opencode-android 的其他 Issue
-
F-droid release未关闭
难度 3/5 1-2 天 新手友好度 55/100
anomalyco/opencode-android#345 ·
维护者通常 1 天内回复
-
Crash: IllegalStateException in AppContext.getLiveValue可能已有人在做 @Tarquinen 于 1 天前认领。 未关闭crash crash-triaged
难度 3/5 半天 新手友好度 65/100
anomalyco/opencode-android#343 · 1 条评论 ·
维护者通常 1 天内回复
-
crash crash-needs-human crash-triaged
难度 3/5 1-2 天 新手友好度 58/100
anomalyco/opencode-android#341 · 1 条评论 ·
维护者通常 1 天内回复
-
crash crash-needs-human crash-triaged
难度 3/5 1-2 天 新手友好度 45/100
anomalyco/opencode-android#340 · 1 条评论 ·
维护者通常 1 天内回复
-
Crash: OutOfMemoryError in LiveTransportKt$awaitResponse$2$2.onResponse可能已有人在做 @Tarquinen 于 3 天前认领。 未关闭crash crash-triaged
难度 2/5 1-3 小时 新手友好度 35/100
anomalyco/opencode-android#320 · 1 条评论 ·
维护者通常 1 天内回复
查看 anomalyco/opencode-android 的全部 Issue
相似的 Issue
-
feature request needs decision
难度 2/5 1-3 小时 新手友好度 83/100
tswistak/Battery-Monitor#207 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
-
F-Droid FOSS question
难度 1/5 1 小时以内 新手友好度 75/100
d4rken-org/butler#365 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
panel-assistant/android#224 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复