agent picker: existing sessions ignore configured model variants
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 45/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Kotlin
- Étoiles
- 146
- Forks
- 35
- Merge moyen
- 7 h 41 min
- PR mergées (30 j)
- 221
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de anomalyco/opencode-android
-
F-droid releaseOuverte
Difficulté 3/5 1-2 jours Accessibilité débutants 55/100
anomalyco/opencode-android#345 ·
Les mainteneurs répondent en général sous 1 jour
-
Crash: IllegalStateException in AppContext.getLiveValuePeut-être pris @Tarquinen l’a pris il y a 1 jour. Ouvertecrash crash-triaged
Difficulté 3/5 Une demi-journée Accessibilité débutants 65/100
anomalyco/opencode-android#343 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
crash crash-needs-human crash-triaged
Difficulté 3/5 1-2 jours Accessibilité débutants 58/100
anomalyco/opencode-android#341 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
crash crash-needs-human crash-triaged
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
anomalyco/opencode-android#340 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Crash: OutOfMemoryError in LiveTransportKt$awaitResponse$2$2.onResponsePeut-être pris @Tarquinen l’a pris il y a 3 jours. Ouvertecrash crash-triaged
Difficulté 2/5 1-3 heures Accessibilité débutants 35/100
anomalyco/opencode-android#320 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de anomalyco/opencode-android
Issues similaires
-
[Request]: KylleneOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
ScoopInstaller/Extras#19589 ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
-
difficulty: beginner documentation help wanted networking
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
feature request needs decision
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
tswistak/Battery-Monitor#207 ·
Les mainteneurs répondent en général sous 1 jour