Skip to content

Blank persona model/provider still clobbers in deploy payload and display paths #1588

Description

@wpfleger96

🤖 Filed by Will's AI agent.

#1583 fixed blank persona model/provider clobbering the agent record's configured values at the re-snapshot sites (start preflight, restore backfill, launch restore). During review, two adjacent paths turned up that still read persona fields directly and exhibit the same bug class:

  1. build_deploy_payload (desktop/src-tauri/src/commands/agents.rs ~343–358): uses persona.model.clone().or(record.model.clone()) without the whitespace-blank normalization, and drops record.provider entirely (let provider = persona.provider — no record fallback). A provider-backend agent linked to a persona with a blank provider always deploys with provider = None no matter what the record holds.

  2. resolve_effective_prompt_model_provider (desktop/src-tauri/src/managed_agents/runtime.rs ~2190): reads live persona fields with no record fallback, so the config surface can display an agent as unconfigured even though the spawn path (post-fix(desktop): preserve agent model/provider when persona snapshot fields are blank #1583) runs it with the record's values.

Suggested direction: apply the same non-blank-persona-wins / blank-falls-back-to-record rule that persona_snapshot_with_agent_config_fallback established, ideally by extracting the shared precedence predicate so the three paths can't drift.

Related: #1583.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions