fix: correctly pass poe web_search via extra_body when built-in search is enabled#13434
Merged
DeJeune merged 2 commits intoCherryHQ:mainfrom Mar 13, 2026
Merged
fix: correctly pass poe web_search via extra_body when built-in search is enabled#13434DeJeune merged 2 commits intoCherryHQ:mainfrom
DeJeune merged 2 commits intoCherryHQ:mainfrom
Conversation
kovsu
commented
Mar 13, 2026
| ...providerOptions, | ||
| ...webSearchParams | ||
| } | ||
| providerOptions = merge({}, providerOptions, webSearchParams) |
Collaborator
Author
There was a problem hiding this comment.
// reasoning.ts
if (isOpenAIReasoningModel(model)) {
return {
extra_body: {
reasoning_effort: reasoningEffort === 'auto' ? 'medium' : reasoningEffort
}
}
}如果 providerOptions 和 webSearchParams 都有 extra_body 这个参,使用... 就没有合并起来而是 webSearchParams 覆盖了 providerOptions。所以这里我们使用 lodash 提供的 merge 方法。
EurFelux
reviewed
Mar 13, 2026
Collaborator
EurFelux
left a comment
There was a problem hiding this comment.
Could you add a test case in option.test.ts for poe provider?
Collaborator
|
Note This comment was translated by Claude. Perhaps it's time to migrate Poe to the Responses API Original Content也许应该为Poe迁移到 Responses API 了 |
Collaborator
Author
I’m glad to do it in a separate PR |
EurFelux
approved these changes
Mar 13, 2026
Collaborator
That will help a lot, thank you! :) |
DeJeune
approved these changes
Mar 13, 2026
kangfenmao
pushed a commit
that referenced
this pull request
Mar 13, 2026
…h is enabled (#13434) Fix #13305 > https://creator.poe.com/docs/external-applications/openai-compatible-api#using-custom-parameters-with-extra_body ```js import OpenAI from "openai"; const client = new OpenAI({ apiKey: process.env.POE_API_KEY, baseURL: "https://api.poe.com/v1", }); // Example: Using web search and thinking level with Gemini models const response = await client.chat.completions.create({ model: "Gemini-3-Pro", messages: [{ role: "user", content: "What are the latest developments in quantum computing?" }], extra_body: { web_search: true, thinking_level: "high" } }); ``` ```release-note fix(poe): correctly pass poe web_search via extra_body when built-in search is enabled ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #13305