feat: provider/model selection for personas and runtime-aware env injection#794
Merged
Merged
Conversation
5172532 to
6c90bad
Compare
e50bdbf to
41ebf2b
Compare
6c90bad to
d54f3c0
Compare
41ebf2b to
75d3077
Compare
d54f3c0 to
9842fec
Compare
30b434a to
a81cc76
Compare
094d114 to
70f9c0b
Compare
a81cc76 to
04391d4
Compare
70f9c0b to
643f3ec
Compare
28b27b9 to
ed5d9f1
Compare
643f3ec to
c9b0d56
Compare
9466fc1 to
66de98f
Compare
c9b0d56 to
dffa75e
Compare
66de98f to
60f95a2
Compare
Base automatically changed from
worktree-wpfleger+fix-model-picker-runtime-ux
to
main
June 7, 2026 18:41
e607cbf to
7b3a192
Compare
db8a098 to
de81ed1
Compare
de81ed1 to
0c44d4e
Compare
tlongwell-block
approved these changes
Jun 9, 2026
…e env injection Add structured provider and model fields to PersonaRecord, with runtime-aware env injection at spawn and deploy time. Pack import filters derived provider/model env vars to prevent stale env values from shadowing the structured fields. Signed-off-by: Will Pfleger <wpfleger@block.xyz>
0c44d4e to
ba28ea0
Compare
tlongwell-block
pushed a commit
that referenced
this pull request
Jun 10, 2026
* origin/main: Fix post-compact handoff context for OpenAI providers (#931) chore(release): release version 0.3.15 (#936) fix: persona is source of truth at spawn + thread-depth conventions (#930) fix: skip avatar reconciliation for legacy agent records (#933) feat(desktop): add nest commit identity guidance with human sign-off (#929) feat: provider/model selection for personas and runtime-aware env injection (#794) fix: reconcile agent profile on startup when relay publish was missed (#921) Revamp first-run onboarding (#924) Update setup loading screen (#926) fix(dm): keep hidden DMs hidden across refetch via relay-signed visibility snapshot (NIP-DV) (#857) Maximize desktop window on launch (#925) feat: preview features (experiments settings UI) (#888) fix(updater): send no-cache header on update check to avoid stale manifest (#922) fix(desktop): refresh channel state after unarchive (#923) Add channel visibility & ephemeral TTL controls to manage sidebar (#911) ci(release): add Intel macOS (x86_64) DMG as a release target (#748) Signed-off-by: npub1mprnacetjua2xx3p5eddmhxyk6wv929ymm5py8kd2xfxurxahspqqlgyta <d8473ee32b973aa31a21a65adddcc4b69cc2a8a4dee8121ecd51926e0cddbc02@sprout-oss.stage.blox.sqprod.co> # Conflicts: # desktop/src/features/sidebar/ui/AppSidebar.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Decouples provider/model configuration from goose-specific config files. Personas now carry an explicit
providerfield, and the desktop injects runtime-appropriate env vars when spawning agents. Pack imports filter derived provider/model env keys so stale values cannot shadow the structured fields after UI edits.Rebased on top of #868 (Wes's Databricks-defaults-env-only PR) — all goose config compat code removed from
sprout-agent.Changes
sprout-agent
config/directory back to flatconfig.rs— removedgoose_compat.rs(345 lines of YAML parsing, superseded by sprout-agent: make Databricks defaults env-only #868's env-only approach)sprout-persona
resolve.rs:runtime_env_vars()branches on theruntimefield to emit runtime-appropriate env var names (SPROUT_AGENT_MODEL/SPROUT_AGENT_PROVIDERfor sprout-agent,GOOSE_MODEL/GOOSE_PROVIDERfor goose)tests/e2e_env_flow.rs: 5 integration tests covering env var emission for both runtimesdesktop/src-tauri
types.rs: AddPersonaRecord.provider: Option<String>fieldruntime.rs: Addruntime_metadata_env_vars()— injects model/provider env vars from discovery table metadata. Placed beforebuild_databricks_defaults()and user env vars.discovery.rs:model_env_var: Some("SPROUT_AGENT_MODEL")for sprout-agent runtime; stale doc comments updated to reflect vestigial MCP field and scaffoldingsupports_acp_model_switchingfieldmigration.rs: Addreconcile_provider_mcp_commands()andmigrate_persona_provider_to_runtime()lib.rs: Wirereconcile_provider_mcp_commands()into app startup (betweenreconcile_persona_pack_pathsandmigrate_persona_provider_to_runtime)persona_card.rs: EmitllmProviderin exported persona JSONenv_vars.rs: AddDERIVED_PROVIDER_MODEL_ENV_KEYSconstant,is_derived_provider_model_key(), andfilter_derived_provider_model_env_vars()— identifies env keys that are derived from structured fields and must not be persistedenv_vars/tests.rs: 6 regression tests for the derived-key filterpersonas.rs:import_persona_packnow filtersruntime_env_varsthroughfilter_derived_provider_model_env_vars()before persisting toPersonaRecord.env_vars, preventing staleGOOSE_MODEL/GOOSE_PROVIDERvalues from shadowing structured fields after UI editscommands/agents.rs:build_deploy_payloadresolveseffective_modelandeffective_providerfrom the persona's structured fields (with agent record override) and projects them into the deploy JSONdesktop/src (TypeScript)
PersonaDialog.tsx: Provider selection UIpersonaDialogState.ts+ test: provider field round-triptauriPersonas.ts,types.ts: provider field in API typesEnv Var Precedence
In
spawn_agent_child, env vars are set in this order (last write wins):User intent (persona/agent env vars) always wins. Build-time Databricks defaults are a fallback for Block employees — OSS builds bake nothing (intentional).
Not in scope
DATABRICKS_HOSTfor OSS users) — intentional, Block-only convenience feature