Skip to content

feat: add GOOSE_SUBAGENT_MODEL and GOOSE_SUBAGENT_PROVIDER config options#7277

Merged
DOsinga merged 1 commit intomainfrom
feat/subagent-model-provider-env-vars
Feb 18, 2026
Merged

feat: add GOOSE_SUBAGENT_MODEL and GOOSE_SUBAGENT_PROVIDER config options#7277
DOsinga merged 1 commit intomainfrom
feat/subagent-model-provider-env-vars

Conversation

@tlongwell-block
Copy link
Collaborator

Adds GOOSE_SUBAGENT_MODEL and GOOSE_SUBAGENT_PROVIDER to the subagent provider resolution chain in resolve_provider(). Uses Config::global().get_param() (env var with config.yaml fallback), matching the GOOSE_LEAD_*/GOOSE_PLANNER_* pattern.

Priority: delegate params > recipe/agent settings > these config options > parent session inheritance.

One or both can be set. When neither is set, behavior is unchanged.

@tlongwell-block tlongwell-block force-pushed the feat/subagent-model-provider-env-vars branch from eb39de1 to ebb982e Compare February 17, 2026 19:47
@tlongwell-block
Copy link
Collaborator Author

/goose

@github-actions
Copy link
Contributor

Summary: This PR adds GOOSE_SUBAGENT_MODEL and GOOSE_SUBAGENT_PROVIDER config options to the subagent provider resolution chain. The implementation is clean, minimal, and correctly follows the established GOOSE_LEAD_*/GOOSE_PLANNER_* pattern using Config::global().get_param().

✅ Highlights

  1. Consistent pattern usage (summon.rs:1410-1413, 1438-1439): Uses Config::global().get_param() which provides env var lookup with config.yaml fallback, matching how GOOSE_LEAD_* and GOOSE_PLANNER_* are handled elsewhere in the codebase.

  2. Correct priority chain: The placement in the resolution chain follows the documented priority (delegate params > recipe/agent settings > config options > parent session inheritance).

  3. Minimal, focused change: Only 8 lines added, exactly where needed. No unnecessary refactoring or scope creep.

🟢 Suggestions

  1. Pre-existing inconsistency (summon.rs:1454): The nearby resolve_max_turns() function uses std::env::var("GOOSE_SUBAGENT_MAX_TURNS") directly instead of Config::global().get_param(). This means GOOSE_SUBAGENT_MAX_TURNS only reads from env vars, not config.yaml, while the new GOOSE_SUBAGENT_PROVIDER/GOOSE_SUBAGENT_MODEL options support both. Consider aligning this in a follow-up PR for consistency:
    // Current (env var only):
    std::env::var("GOOSE_SUBAGENT_MAX_TURNS")
    
    // Could be (env var + config.yaml):
    Config::global().get_param::<usize>("GOOSE_SUBAGENT_MAX_TURNS")
    This is not blocking as it's outside the scope of this PR.

Review generated by goose

@DOsinga DOsinga added this pull request to the merge queue Feb 18, 2026
Merged via the queue into main with commit a11b16f Feb 18, 2026
26 of 27 checks passed
@DOsinga DOsinga deleted the feat/subagent-model-provider-env-vars branch February 18, 2026 15:32
aharvard added a commit that referenced this pull request Feb 18, 2026
* origin/main:
  feat: add GOOSE_SUBAGENT_MODEL and GOOSE_SUBAGENT_PROVIDER config options (#7277)
  fix(openai): support "reasoning" field alias in streaming deltas (#7294)
  fix(ui): revert app-driven iframe width and send containerDimensions per ext-apps spec (#7300)
  New OpenAI event (#7301)
  ci: add fork guards to scheduled workflows (#7292)
  fix: allow ollama input limit override (#7281)
  chore: show important keys for provider configuration (#7265)
  fix: subrecipe relative path with summon (#7295)
  fix extension selector not displaying the correct enabled extensions (#7290)
  Use the working dir from the session (#7285)
  Fix: Minor logging uplift for debugging of prompt injection mitigation (#7195)
  feat(otel): make otel logging level configurable (#7271)
  docs: add documentation for Top Of Mind extension (#7283)
  Document gemini 3 thinking levels (#7282)
  docs: stream subagent tool calls (#7280)
  Docs: delete custom provider in desktop (#7279)

# Conflicts:
#	ui/desktop/src/components/McpApps/McpAppRenderer.tsx
jh-block added a commit that referenced this pull request Feb 18, 2026
* origin/main:
  docs: remove ALPHA_FEATURES flag from documentation (#7315)
  docs: escape variable syntax in recipes (#7314)
  docs: update OTel environment variable and config guides (#7221)
  docs: system proxy settings (#7311)
  docs: add Summon extension tutorial and update Skills references (#7310)
  docs: agent session id (#7289)
  fix(gemini-cli): restore streaming lost in #7247 (#7291)
  Update more instructions (#7305)
  feat: add Moonshot and Kimi Code declarative providers (#7304)
  fix(cli): handle Reasoning content and fix streaming thinking display (#7296)
  feat: add GOOSE_SUBAGENT_MODEL and GOOSE_SUBAGENT_PROVIDER config options (#7277)
  fix(openai): support "reasoning" field alias in streaming deltas (#7294)
  fix(ui): revert app-driven iframe width and send containerDimensions per ext-apps spec (#7300)
  New OpenAI event (#7301)
  ci: add fork guards to scheduled workflows (#7292)
michaelneale added a commit that referenced this pull request Feb 19, 2026
* main: (54 commits)
  docs: add monitoring subagent activity section (#7323)
  docs: document Desktop UI recipe editing for model/provider and extensions (#7327)
  docs: add CLAUDE_THINKING_BUDGET and CLAUDE_THINKING_ENABLED environm… (#7330)
  fix: display 'Code Mode' instead of 'code_execution' in CLI (#7321)
  docs: add Permission Policy documentation for MCP Apps (#7325)
  update RPI plan prompt (#7326)
  docs: add CLI syntax highlighting theme customization (#7324)
  fix(cli): replace shell-based update with native Rust implementation (#7148)
  docs: rename Code Execution extension to Code Mode extension (#7316)
  docs: remove ALPHA_FEATURES flag from documentation (#7315)
  docs: escape variable syntax in recipes (#7314)
  docs: update OTel environment variable and config guides (#7221)
  docs: system proxy settings (#7311)
  docs: add Summon extension tutorial and update Skills references (#7310)
  docs: agent session id (#7289)
  fix(gemini-cli): restore streaming lost in #7247 (#7291)
  Update more instructions (#7305)
  feat: add Moonshot and Kimi Code declarative providers (#7304)
  fix(cli): handle Reasoning content and fix streaming thinking display (#7296)
  feat: add GOOSE_SUBAGENT_MODEL and GOOSE_SUBAGENT_PROVIDER config options (#7277)
  ...
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

Comments