-
-
Notifications
You must be signed in to change notification settings - Fork 331
fix(ai): replay OpenAI reasoning items on tool follow-up #1290
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
Changes from all commits
b6a5e0d
9c942f1
c5e580b
ad660ac
ed68dc3
4f1dd91
dafec5f
f08446d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@tanstack/ai': patch | ||
| '@tanstack/openai-base': patch | ||
| '@tanstack/ai-openai': patch | ||
| --- | ||
|
|
||
| Replay OpenAI Responses reasoning items with function_call on the next tool turn. Default `include: ['reasoning.encrypted_content']` only on reasoning models. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -95,3 +95,8 @@ OPENAI_API_KEY | |
| `effort: 'low'` or higher to enable reasoning. | ||
| - `o3-pro` only supports `high` reasoning effort. | ||
| - `conversation` and `previous_response_id` cannot be used together. | ||
| - Reasoning models (`o*`, `gpt-5*` except `*-chat-latest`, `codex-mini-latest`) | ||
| pair each `function_call` with a `reasoning` item. The adapter requests | ||
| `include: ['reasoning.encrypted_content']` for those models and replays that | ||
| item on the next turn. Pre-5 chat models are left unchanged. If you persist | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Align the unchanged-model sentence with the preceding exception. The preceding pattern excludes every 🤖 Prompt for AI Agents |
||
| history by hand, keep `thinking[].signature`. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
Document the
includeoverride behavior.The adapter adds
reasoning.encrypted_contentonly whenincludeis not provided. If a caller supplies an explicitincludelist without this entry, the adapter cannot capture the encrypted content needed for next-turn replay. State this condition so callers do not configure a tool loop that can still return HTTP 400.🧰 Tools
🪛 LanguageTool
[grammar] ~100-~100: Ensure spelling is correct
Context: ...crypted_content']` for those models and replays that item on the next turn. Pre-5 cha...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🤖 Prompt for AI Agents