Fix OpenAI OAuth web search and image generation#452
Merged
ericdallo merged 2 commits intoeditor-code-assistant:masterfrom May 8, 2026
Merged
Fix OpenAI OAuth web search and image generation#452ericdallo merged 2 commits intoeditor-code-assistant:masterfrom
ericdallo merged 2 commits intoeditor-code-assistant:masterfrom
Conversation
Use the current OpenAI Responses web_search tool type and avoid filtering built-in web search and image generation only because the request uses OAuth. Also skip server web-search history artifacts when replaying OpenAI conversation history on follow-up turns. 🤖 Generated with [eca](https://eca.dev) Co-Authored-By: eca-agent <git@eca.dev>
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.
The OpenAI built-in web-search and image-generation didn't work when authentication with OAuth, because the authentication method flag was used to drop this feature.
New issues arised as the newer models required the
web_searchtool instead of the legacyweb_search_previewtool. Also, the server tried to send web-search artefacts back to OpenAi when continuing the conversation, which caused an API error.This PR should fix these issues. I got openai/gpt-5.5 and openai/gpt-5.4 models with OAuth to search the web and generate images. openai/gpt-5.3-codex doesn't see the tools as per design. I couldn't verify if some older models using API key authentication might still rely on the
web_search_previewtool.AI Summary
web_searchtool type instead of the legacyweb_search_previewtype.Verification
clojure -M:test --focus eca.llm-providers.openai-testclj-kondo --lint src/eca/llm_providers/openai.clj test/eca/llm_providers/openai_test.cljcould not be run locally becauseclj-kondois not installed in this environment.🤖 Generated with eca