Files
buzz/desktop/scripts
Will Pfleger 48b334fe16 feat: provider/model selection for personas and runtime-aware env injection
- Add PersonaRecord.provider field (types.rs) for LLM inference provider
- Add runtime_metadata_env_vars() in runtime.rs: injects SPROUT_AGENT_MODEL /
  SPROUT_AGENT_PROVIDER (or GOOSE_MODEL / GOOSE_PROVIDER) based on discovery
  table metadata, placed before build_databricks_defaults() and user env vars
- Add reconcile_provider_mcp_commands() and migrate_persona_provider_to_runtime()
  migrations in migration.rs
- Update sprout-persona/resolve.rs: runtime_env_vars() branches on runtime field
  to emit runtime-appropriate env var names
- Add e2e_env_flow.rs integration tests for env var emission
- Update PersonaDialog.tsx with provider UI
- Update persona_card.rs to emit llmProvider in exported JSON
- Update personaDialogState.ts + tests for provider round-trip
- Update discovery.rs: model_env_var: Some("SPROUT_AGENT_MODEL") for sprout-agent
- Flatten crates/sprout-agent/src/config/ back to config.rs (remove goose_compat.rs)
- Remove all goose config compat code from sprout-agent (superseded by Wes's #868)

Env var precedence in spawn_agent_child:
  parent env
  -> runtime_metadata_env_vars() (agent-specific model/provider)
  -> build_databricks_defaults() (compile-time Databricks fallback for Block builds)
  -> user env vars: persona then agent (last wins -- user intent is authoritative)
2026-06-08 13:09:32 -04:00
..