Skip to content

Fix OpenAI OAuth web search and image generation#452

Merged
ericdallo merged 2 commits intoeditor-code-assistant:masterfrom
itkonen:fix/openai-oauth-web-search
May 8, 2026
Merged

Fix OpenAI OAuth web search and image generation#452
ericdallo merged 2 commits intoeditor-code-assistant:masterfrom
itkonen:fix/openai-oauth-web-search

Conversation

@itkonen
Copy link
Copy Markdown
Contributor

@itkonen itkonen commented May 8, 2026

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_search tool instead of the legacy web_search_preview tool. 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_preview tool.


AI Summary

  • Preserve OpenAI built-in web search and image generation tools when using OAuth authentication, relying on model capabilities instead of auth type to decide tool availability.
  • Use the current OpenAI Responses API web_search tool type instead of the legacy web_search_preview type.
  • Skip OpenAI server web-search history artifacts during replay so follow-up turns after web search do not crash.

Verification

  • clojure -M:test --focus eca.llm-providers.openai-test
  • Manual test with a locally built ECA server confirmed OpenAI OAuth web search works across follow-up turns.
  • clj-kondo --lint src/eca/llm_providers/openai.clj test/eca/llm_providers/openai_test.clj could not be run locally because clj-kondo is not installed in this environment.

🤖 Generated with eca

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>
@itkonen itkonen marked this pull request as ready for review May 8, 2026 07:49
Copy link
Copy Markdown
Member

@ericdallo ericdallo left a comment

Choose a reason for hiding this comment

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

Thank you!

@ericdallo ericdallo merged commit 029933e into editor-code-assistant:master May 8, 2026
7 checks passed
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.

2 participants