Repository navigation
feat: ChatGPT web search and image generation for Codex models - #176
Merged
Merged
Conversation
Codex-model runs now get `web_search` and `generate_image` tools backed by the connected ChatGPT subscription (the same backend endpoints the Codex CLI uses). Generated images are saved to a gitignored `.opengui-images/` folder in the Project and shown inline in the transcript; search sources are shown as links. A Host policy in Settings → Integrations controls web search (live, cached, off), image generation, and whether shared model offerings may use the Host subscription (off by default). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
Summary
Runs that use a Codex model (ChatGPT subscription) now get two extra tools, both backed by the same ChatGPT endpoints the Codex CLI uses:
web_searchcallsbackend-api/codex/alpha/searchand supportssearch_query,openandfind. Search state is scoped per Session, so lateropen/findcalls can reuse ref ids from earlier searches. Citation markers are normalized to[turn0search0]. Results include up to 10 deduplicated http(s) sources, shown as links in the transcript.generate_imagecallsimages/generations, orimages/editswhen reference images are given (gpt-image-2). It supports transparent backgrounds and up to 5 reference images from the Project. Reference paths go through the Host path authorizer. Images are saved to<project>/.opengui-images/<toolCallId>.png; the folder gets its own.gitignore(*) and existing files are never overwritten. The model also gets the image as an attachment, and the transcript shows it pinned below the tool row.Host policy (Settings → Integrations)
The policy is stored in Host settings and exposed at
GET/PUT /api/host/codex-tools;PUTrequires a human admin.Harness changes
combineAgentToolSourcesmerges severalAgentToolSources (MCP and ChatGPT tools) and rejects duplicate tool names.AgentToolScopenow includes the run'smodel, andinvokereceivestoolCallId.ModelToolDefinition.maxResultByteslets a tool raise its result cap, clamped to 64KB. Search results use 32KB.Errors
Testing
vp checkis clean.open, and a transparent image generated and saved.pnpm run slop-checkpasses.vp testsuite was not run here, only the affected areas (backend codex-tools, host, routes, harness agent tools, transcript, message-list).🤖 Generated with Claude Code