Skip to content

sprout-agent: make Databricks defaults env-only#868

Merged
wesbillman merged 1 commit into
mainfrom
brain/databricks-defaults
Jun 8, 2026
Merged

sprout-agent: make Databricks defaults env-only#868
wesbillman merged 1 commit into
mainfrom
brain/databricks-defaults

Conversation

@wesbillman

@wesbillman wesbillman commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

What

Final shape for internal Databricks defaults:

  • Remove sprout-agent's Goose config lookup entirely. sprout-agent now only reads its own env vars for Databricks host/model.
  • Keep Databricks fallback env-only: DATABRICKS_HOST + DATABRICKS_MODEL are required for Databricks fallback/selection.
  • Add desktop build-time defaults support so internal builds can inject Databricks host/model into the managed sprout-agent environment without runtime config spelunking.

Why

sprout-agent should not read another agent's config file. Internal defaults belong in the internal build flow (sprout-releases), where they can be maintained explicitly and baked into Block-internal desktop builds.

How

  • crates/sprout-agent/src/config.rs: removes Goose config parsing and associated tests/errors.
  • crates/sprout-agent/README.md: documents Databricks as env-only.
  • desktop/src-tauri/build.rs: maps optional SPROUT_BUILD_DATABRICKS_HOST / SPROUT_BUILD_DATABRICKS_MODEL into compile-time env.
  • desktop/src-tauri/src/managed_agents/runtime.rs: applies those baked values as managed-agent defaults for DATABRICKS_HOST / DATABRICKS_MODEL when present. User GUI/persona env still wins.

Companion PR

squareup/sprout-releases owns the internal values and build-flow docs: squareup/sprout-releases#22

Verification

  • cargo test -p sprout-agent --lib
  • cargo test --manifest-path desktop/src-tauri/Cargo.toml --lib databricks_defaults_empty_in_oss_build
  • Push hooks also ran and passed: desktop-test, mobile-test, desktop-tauri-test, rust-clippy, desktop-tauri-clippy, rust-tests ✅

@wesbillman wesbillman requested a review from a team as a code owner June 5, 2026 14:59
@wesbillman wesbillman force-pushed the brain/databricks-defaults branch from c680c6f to 1773751 Compare June 5, 2026 15:32
@wesbillman wesbillman changed the title desktop: support baking Databricks host/model defaults at build time sprout-agent: read model from active Goose provider Jun 5, 2026
Keep sprout-agent configuration env-only by removing the Goose config fallback.
For internal desktop builds, allow sprout-releases to bake Databricks host/model
values into the binary at compile time; desktop injects those defaults before
persona/agent env vars so user config still wins.

Co-authored-by: Pinky <44b8e82baa6e0e254e0208d68f335c283c94e7b78dd1fa10d5a49d3f13dd0435@sprout-oss.stage.blox.sqprod.co>
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
@wesbillman wesbillman force-pushed the brain/databricks-defaults branch from 1773751 to 425182f Compare June 5, 2026 16:21
@wesbillman wesbillman changed the title sprout-agent: read model from active Goose provider sprout-agent: make Databricks defaults env-only Jun 5, 2026
@wesbillman wesbillman merged commit 4ec7f81 into main Jun 8, 2026
16 checks passed
@wesbillman wesbillman deleted the brain/databricks-defaults branch June 8, 2026 16:17
tellaho pushed a commit that referenced this pull request Jun 8, 2026
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Co-authored-by: Pinky <44b8e82baa6e0e254e0208d68f335c283c94e7b78dd1fa10d5a49d3f13dd0435@sprout-oss.stage.blox.sqprod.co>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
tlongwell-block pushed a commit that referenced this pull request Jun 9, 2026
* origin/main: (32 commits)
  docs: add NIP-ER event reminders (#875)
  feat(acp): pass slash commands through to ACP connectors (#919)
  fix(sdk): resolve multi-word display names and add NIP-27 nostr:npub mention extraction (#905)
  fix(desktop): re-enable mcp_command reconciliation and harden spawn site (#909)
  Fix desktop DM and sidebar UI polish (#908)
  Animate reaction counts (#904)
  Mobile custom emoji + settings redesign (#906)
  Renew TTL when unarchiving ephemeral channels (#902)
  chore(release): release version 0.3.13 (#903)
  Collapse channel header actions (#901)
  sprout-agent: make Databricks defaults env-only (#868)
  Restyle settings sections (#894)
  Add emoji reaction particles (#890)
  Move settings into the app shell (#893)
  Tune chat text sizing (#891)
  Style channel header navigation (#889)
  fix: rename missed known_acp_provider_exact → known_acp_runtime_exact (#900)
  chore(deps): update radix-ui-primitives monorepo (#898)
  chore(deps): update actions/checkout digest to df4cb1c (#897)
  refactor: rename ACP "provider" to "runtime" across the codebase (#783)
  ...

# Conflicts:
#	desktop/src/features/agents/ui/CreateAgentDialog.tsx
tlongwell-block pushed a commit that referenced this pull request Jun 9, 2026
* origin/main: (32 commits)
  docs: add NIP-ER event reminders (#875)
  feat(acp): pass slash commands through to ACP connectors (#919)
  fix(sdk): resolve multi-word display names and add NIP-27 nostr:npub mention extraction (#905)
  fix(desktop): re-enable mcp_command reconciliation and harden spawn site (#909)
  Fix desktop DM and sidebar UI polish (#908)
  Animate reaction counts (#904)
  Mobile custom emoji + settings redesign (#906)
  Renew TTL when unarchiving ephemeral channels (#902)
  chore(release): release version 0.3.13 (#903)
  Collapse channel header actions (#901)
  sprout-agent: make Databricks defaults env-only (#868)
  Restyle settings sections (#894)
  Add emoji reaction particles (#890)
  Move settings into the app shell (#893)
  Tune chat text sizing (#891)
  Style channel header navigation (#889)
  fix: rename missed known_acp_provider_exact → known_acp_runtime_exact (#900)
  chore(deps): update radix-ui-primitives monorepo (#898)
  chore(deps): update actions/checkout digest to df4cb1c (#897)
  refactor: rename ACP "provider" to "runtime" across the codebase (#783)
  ...

Signed-off-by: npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@sprout-oss.stage.blox.sqprod.co>

# Conflicts:
#	desktop/src/features/agents/ui/CreateAgentDialog.tsx
wpfleger96 added a commit that referenced this pull request Jun 9, 2026
…ection

- 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants