Skip to content

disable thinking by default in gemini flash #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

tiye
Copy link
Member

@tiye tiye commented May 29, 2025

No description provided.

@tiye tiye requested review from a team and Copilot May 29, 2025 17:17
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR disables the default “thinking” behavior in the Gemini flash integration by introducing a zero-budget branch and updating how streamed chunks are handled.

  • Split thinkingConfig into a high-budget branch (when think? is true) and a zero-budget branch (when false)
  • Replaced the previous swap! accumulation with a debug console.log and an either fallback on streamed text
  • Propagated the same changes into the calcit.cirru AST representation

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
compact.cirru Updated thinkingConfig instantiation and replaced chunk accumulation with debug log + either
calcit.cirru Mirrored the new thinkingConfig branches and debug/log + either logic in the AST diff
Comments suppressed due to low confidence (5)

compact.cirru:258

  • The code now emits two consecutive js-object calls under :thinkingConfig without conditional logic tying them together. You likely intended to use an if or cond to choose one object instead of listing both unconditionally.
js-object (:thinkingBudget 1000) (:includeThoughts think?) js-object (:thinkingBudget 0) (:includeThoughts false)

compact.cirru:283

  • [nitpick] This console.log appears to be a debug statement. Consider removing or gating it behind a debug flag.
do (js/console.log "With think" chunk)

compact.cirru:284

  • Referencing js/chunk.candidates is incorrect — you should access chunk.candidates[0] directly, not via a js/ prefix.
swap! *text str $ either (.-text chunk) js/chunk.candidates[0].content.parts[0].text

calcit.cirru:2078

  • [nitpick] This AST fragment introduces a js/console.log call. If it’s intended only for debugging, consider removing it from production code.
|X $ %{} :Expr (:at 1748538740807) (:by |rJG4IHzWf)

calcit.cirru:2093

  • The either call is using .-text and then chunk.candidates via js/...; these references should consistently access the same object (e.g., chunk) without mixing prefixes.
|T $ %{} :Leaf (:at 1748538835014) (:by |rJG4IHzWf) (:text |.-text)

@tiye tiye force-pushed the disable-think branch from 2c8ae5a to 93575b8 Compare May 29, 2025 17:31
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.

1 participant