Skip to content

feat: allow GOOSE_CLI_SHOW_THINKING to be set in config.yaml#8097

Merged
DOsinga merged 3 commits intoblock:mainfrom
dale-lakes:fix/show-thinking-from-config
Mar 26, 2026
Merged

feat: allow GOOSE_CLI_SHOW_THINKING to be set in config.yaml#8097
DOsinga merged 3 commits intoblock:mainfrom
dale-lakes:fix/show-thinking-from-config

Conversation

@dale-lakes
Copy link
Copy Markdown
Contributor

Previously GOOSE_CLI_SHOW_THINKING could only be set as an environment variable. Now it can also be set in config.yaml as a boolean, matching how other goose settings work.

Previously this could only be set as an environment variable. Now
it can also be set in config.yaml as a boolean, matching how other
goose settings work.

Signed-off-by: Dale Lakes <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Copy link
Copy Markdown
Contributor

@r0x0d r0x0d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me. Should we have some type of test to verify that this will work correctly?

let from_config = Config::global()
.get_param::<bool>("GOOSE_CLI_SHOW_THINKING")
.unwrap_or(false);
(from_env || from_config) && std::io::stdout().is_terminal()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Config already reads from the env variables, so this is double. I'll fix.

Douwe Osinga added 2 commits March 25, 2026 09:25
Config::get_param already checks env vars (uppercased) before falling
back to config.yaml, so the separate env-var check and static
LazyLock are unnecessary.
Copy link
Copy Markdown
Collaborator

@DOsinga DOsinga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Config::get_param already checks the env var (uppercased key) before falling back to config.yaml, so the separate env-var check and the LazyLock static were redundant. Simplified to a direct call in should_show_thinking().

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 419ff898de

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +450 to +451
.get_param::<bool>("GOOSE_CLI_SHOW_THINKING")
.unwrap_or(false)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve legacy env-var enable semantics

Switching to get_param::<bool>("GOOSE_CLI_SHOW_THINKING") changes the environment-variable contract from “set means enabled” to “must parse as boolean”. In this path, values like GOOSE_CLI_SHOW_THINKING=1 deserialize as a number and then fail bool deserialization, so unwrap_or(false) silently disables thinking output for existing users who followed current docs/examples. This is a behavior regression introduced by this change.

Useful? React with 👍 / 👎.

Comment on lines +449 to +451
Config::global()
.get_param::<bool>("GOOSE_CLI_SHOW_THINKING")
.unwrap_or(false)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Cache thinking visibility instead of loading config per chunk

should_show_thinking() is called from streaming rendering for each MessageContent::Thinking chunk, and it now calls Config::global().get_param(...) every time. get_param falls back to load()/load_raw() when the env var is unset, which performs config file reads/migration checks on each invocation; this adds avoidable per-chunk I/O in the hot path and can degrade streaming responsiveness compared with the previous LazyLock behavior.

Useful? React with 👍 / 👎.

@DOsinga DOsinga added this pull request to the merge queue Mar 26, 2026
Merged via the queue into block:main with commit cdf91ea Mar 26, 2026
21 checks passed
michaelneale added a commit that referenced this pull request Mar 26, 2026
* main: (337 commits)
  fix: replace panics with user-friendly errors in CLI session builder (#7901)
  fix: read GOOSE_CONTEXT_LIMIT from config.yaml, not just env vars (#7900)
  fix: deliver truncation notice as separate content block (#7899)
  fix: use platform-appropriate commands in developer extension instructions (#7898)
  fix: replace any with proper SVG types in icon components (#7873)
  chore: remove debug console.log statements, stale comments, and dead code (#8142)
  feat: Gemini OAuth provider (#8129)
  chore(deps): bump picomatch from 2.3.1 to 2.3.2 in /documentation (#8123)
  feat: show installed skills in UI (#7910)
  fix(deps): gate keyring platform features behind target-specific deps (#8039)
  chore(deps): bump yaml from 2.8.2 to 2.8.3 in /evals/open-model-gym/suite (#8124)
  fix: strip message wrapper in CLI session title generation (#7996)
  fix(providers): fall back to configured models when models endpoint fetch fails (#7530)
  chore(deps): bump brace-expansion from 5.0.3 to 5.0.5 in /evals/open-model-gym/suite (#8139)
  fix: prevent Ollama provider from hanging on tool-calling requests (#7723)
  fix: VMware Tanzu Platform provider - bug fixes, streaming, UI improvements (#8126)
  feat: allow GOOSE_CLI_SHOW_THINKING to be set in config.yaml (#8097)
  fix: GitHub Copilot auth fails to open browser in Desktop app (#6957) (#8019)
  fix(ci): produce .tar.gz archives for Zed ACP registry compatibility (#8054)
  feat: add GOOSE_SHOW_FULL_OUTPUT config to disable tool output truncation (#7919)
  ...

# Conflicts:
#	crates/goose/src/providers/formats/openai.rs
hydrosquall pushed a commit to hydrosquall/goose that referenced this pull request Mar 31, 2026
)

Signed-off-by: Dale Lakes <[email protected]>
Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
Co-authored-by: Douwe Osinga <[email protected]>
Signed-off-by: Cameron Yick <[email protected]>
blackgirlbytes pushed a commit that referenced this pull request Apr 2, 2026
* main: (337 commits)
  fix: replace panics with user-friendly errors in CLI session builder (#7901)
  fix: read GOOSE_CONTEXT_LIMIT from config.yaml, not just env vars (#7900)
  fix: deliver truncation notice as separate content block (#7899)
  fix: use platform-appropriate commands in developer extension instructions (#7898)
  fix: replace any with proper SVG types in icon components (#7873)
  chore: remove debug console.log statements, stale comments, and dead code (#8142)
  feat: Gemini OAuth provider (#8129)
  chore(deps): bump picomatch from 2.3.1 to 2.3.2 in /documentation (#8123)
  feat: show installed skills in UI (#7910)
  fix(deps): gate keyring platform features behind target-specific deps (#8039)
  chore(deps): bump yaml from 2.8.2 to 2.8.3 in /evals/open-model-gym/suite (#8124)
  fix: strip message wrapper in CLI session title generation (#7996)
  fix(providers): fall back to configured models when models endpoint fetch fails (#7530)
  chore(deps): bump brace-expansion from 5.0.3 to 5.0.5 in /evals/open-model-gym/suite (#8139)
  fix: prevent Ollama provider from hanging on tool-calling requests (#7723)
  fix: VMware Tanzu Platform provider - bug fixes, streaming, UI improvements (#8126)
  feat: allow GOOSE_CLI_SHOW_THINKING to be set in config.yaml (#8097)
  fix: GitHub Copilot auth fails to open browser in Desktop app (#6957) (#8019)
  fix(ci): produce .tar.gz archives for Zed ACP registry compatibility (#8054)
  feat: add GOOSE_SHOW_FULL_OUTPUT config to disable tool output truncation (#7919)
  ...

# Conflicts:
#	crates/goose/src/providers/formats/openai.rs
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.

3 participants