fix(agent): save original provider ID instead of alias in session meta
setProvider() was saving the alias-resolved provider (e.g. "anthropic" instead of "claude-code") to session metadata. On restart, this caused the wrong provider to be selected. Now saves the original providerId so the exact user selection is preserved. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
15f6604a16
commit
2fa8c383fb
1 changed files with 3 additions and 3 deletions
|
|
@ -316,7 +316,7 @@ export class Agent {
|
|||
}
|
||||
|
||||
this.session.saveMeta({
|
||||
provider: this.agent.state.model?.provider,
|
||||
provider: this.resolvedProvider,
|
||||
model: this.agent.state.model?.id,
|
||||
thinkingLevel: this.agent.state.thinkingLevel,
|
||||
reasoningMode: this.reasoningMode,
|
||||
|
|
@ -874,9 +874,9 @@ export class Agent {
|
|||
// Update internal state
|
||||
this.resolvedProvider = providerId;
|
||||
|
||||
// Update session metadata
|
||||
// Update session metadata (save original providerId, not alias-resolved)
|
||||
this.session.saveMeta({
|
||||
provider: actualProvider,
|
||||
provider: providerId,
|
||||
model: model.id,
|
||||
thinkingLevel: this.agent.state.thinkingLevel,
|
||||
reasoningMode: this.reasoningMode,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue