Skip to content

Conversation

@hadley
Copy link
Member

@hadley hadley commented Oct 29, 2025

  • New reasoning_effort and reasoning_tokens arguments to params()
  • chat_claude() uses reasoning_tokens and streams thinking summaries
  • chat_google_gemini() uses reasoning_tokens. Gemini doesn't appear to have a thinking content type so no additional support needed.
  • chat_openai_responses() uses reasoning_effort and streams thinking summaries. It correctly captures summaries into ContentThinking

The streaming support is suboptimal since there doesn't appear to be an easy way to distinguish thinking and regular output.

Fixes #720

I tested interactively with

chat <- chat_claude(params = params(reasoning_tokens = 2048))
chat$chat("Tell me a joke. Think hard.")
chat$chat("Why is that funny?")
chat

# Thoughts just stream as text; no special type
chat <- chat_google_gemini(params = params(reasoning_tokens = 2048))
chat$chat("Tell me a joke. Think hard.")
chat$chat("Why is that funny?")
chat

chat <- chat_openai_responses(model = "gpt-5", param = params(reasoning_effort = "low"))
chat$chat("Tell me a joke.")
chat$chat("Why is that funny?")
chat

* New `reasoning_effort` and `reasoning_tokens` arguments to `params()`
* `chat_claude()` uses `reasoning_tokens` and streams thinking summaries
* `chat_google_gemini()` uses `reasoning_tokens`. Gemini doesn't appear to have a thinking content type so no additional support needed.
* `chat_openai_responses()` uses `reasoning_effort` and streams thinking summaries. It correctly captures summaries into `ContentThinking`

The streaming support is suboptimal since there doesn't appear to be an easy way to distinguish thinking and regular output.

Fixes #720
@hadley hadley requested a review from gadenbuie October 29, 2025 19:00
@jrosell

This comment was marked as off-topic.

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.

Add reasoning_effort to params()

3 participants