Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Default reviewers
* @lidge-jun @Ingwannu @Wibias
* @lidge-jun @Ingwannu

# High-impact runtime behavior
/src/adapters/ @lidge-jun @Ingwannu @Wibias
/src/providers/ @lidge-jun @Ingwannu @Wibias
/src/codex/ @lidge-jun @Ingwannu @Wibias
/src/server/ @lidge-jun @Ingwannu @Wibias
/src/adapters/ @lidge-jun @Ingwannu
/src/providers/ @lidge-jun @Ingwannu
/src/codex/ @lidge-jun @Ingwannu
/src/server/ @lidge-jun @Ingwannu

# Repository automation and release security
/.github/ @lidge-jun @Ingwannu
Expand Down
37 changes: 32 additions & 5 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,23 @@ review and merge policy.
| --- | --- | --- |
| [@lidge-jun](https://github.com/lidge-jun) | Project owner | Project direction, releases, repository administration, and final governance decisions |
| [@Ingwannu](https://github.com/Ingwannu) | Maintainer | Issue and pull-request triage, `dev` integration, security review, and repository maintenance |
| [@Wibias](https://github.com/Wibias) | Maintainer | Issue and pull-request triage, `dev` integration, and provider/CI maintenance |

The table describes project responsibilities. Actual repository permissions remain controlled
through GitHub repository settings.

`dev` is the only integration line. The former `dev2-go` carry duty is retired;
see [The retired `dev2-go` line](#the-retired-dev2-go-line).

## Former maintainers

| GitHub account | Project role | Period |
| --- | --- | --- |
| [@Wibias](https://github.com/Wibias) | Maintainer | 2026-07-27 – 2026-08-19 |

Former maintainers keep contributor standing and are welcome to open issues and pull requests like
anyone else. Authorship credit in git history, release notes, and code comments is not rewritten
when a maintainer steps down.

## Review and merge policy

- Pull requests target `dev`. It is the only integration line, and promotion to
Expand Down Expand Up @@ -98,17 +107,35 @@ Adding or removing a maintainer requires:

### Change log

- 2026-08-19 — [@Wibias](https://github.com/Wibias) stepped down as a maintainer
and is now a contributor. This follows his own decision to stop developing
opencodex; it is not a disciplinary action, and it was made with the owner's
agreement (requirement 1). Requirement 2 does not apply to a maintainer's own
resignation, which needs no second maintainer to ratify it. Requirement 3 is
met by this file and `.github/CODEOWNERS`, where the default-reviewer line
and the four runtime paths that listed him (`/src/adapters/`,
`/src/providers/`, `/src/codex/`, `/src/server/`) drop back to the two
remaining maintainers. Repository permission was reduced to read access at
the same time, so the roster and the GitHub settings agree again.

Nothing he authored is being unwound. His commits, the pull requests he
merged, the release-note attributions, and the code comments citing his
reviews stay exactly as they are, and the trust-lane gate derived from his
work in `.github/scripts/pr-sponsored-surface.cjs` keeps its attribution.
Returning to the maintainer table later would go through the same three
requirements that govern every addition.

- 2026-07-27 — [@Wibias](https://github.com/Wibias) added as a maintainer.
Requirement 1 (agreement from the project owner) is met: the owner requested
the addition. **Requirement 2 (review by another current maintainer) was
never satisfied in the form this document describes.** The three commits that
carried the addition (`a2693c02`, `dc3a4ade`, `02bbd47a`) landed on `dev` as
direct owner pushes with no associated pull request, so no second maintainer
reviewed them. Requirement 3 is met by this file and `.github/CODEOWNERS`.
The addition is in effect regardless: @Wibias holds write access on the
repository and has been merging pull requests since 2026-07-26. This entry
records the gap rather than papering over it — a later maintainer change
should go through a reviewed pull request.
The addition took effect regardless: @Wibias held write access on the
repository and merged pull requests from 2026-07-26 until he stepped down on
2026-08-19. This entry records the gap rather than papering over it — a later
maintainer change should go through a reviewed pull request.

Scope covers issue and pull-request triage, `dev` integration, and
provider/CI maintenance. (This entry originally also described carrying
Expand Down
5 changes: 5 additions & 0 deletions src/responses/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ function mapToolChoice(value: unknown): OcxRequestOptions["toolChoice"] {
if (t === "image_generation" || t === "image_gen") {
return { name: IMAGE_GEN_TOOL_NAME };
}
// Hosted web-search choices force the synthetic routed search tool. Treating this shape as
// `auto` would also advertise unrelated client tools when the sidecar injects web_search.
if (t === "web_search" || t === "web_search_preview") {
return { name: WEB_SEARCH_TOOL_NAME };
Comment on lines +135 to +136

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Activate the sidecar for forced web_search_preview choices

For a routed Responses request whose tool declaration and choice both use the supported web_search_preview type, this new branch sets toolChoice to { name: "web_search" }, but extractHostedWebSearch() recognizes only type === "web_search". Consequently _webSearch remains unset, planWebSearch() returns no plan, the synthetic tool is never injected, and adapter filtering removes every unrelated declared tool, so the model produces an ordinary answer without performing the forced search. Normalize or extract web_search_preview as a hosted search too, and add a routed-planning regression case for this branch.

AGENTS.md reference: src/AGENTS.md:L22-L25

Useful? React with 👍 / 👎.

}
if (t === "allowed_tools" && Array.isArray(value.tools)) {
const names = value.tools
.map(allowedToolName)
Expand Down
14 changes: 14 additions & 0 deletions tests/responses-parser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,20 @@ describe("Responses parser", () => {
expect(parsed.options.toolChoice).toEqual({ allowedTools: ["web_search"], mode: "required" });
});

test("maps a forced hosted web_search choice to the synthetic routed tool", () => {
const parsed = parseRequest({
model: "umans/umans-kimi-k2.7",
input: "search",
tools: [
{ type: "web_search" },
{ type: "function", name: "run_shell", parameters: { type: "object" } },
],
tool_choice: { type: "web_search" },
});

expect(parsed.options.toolChoice).toEqual({ name: "web_search" });
});
Comment on lines +209 to +221

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add coverage for web_search_preview.

The parser now handles both web_search and web_search_preview, but this test covers only web_search. Add a second case that expects { name: "web_search" } for tool_choice: { type: "web_search_preview" }.

As per path instructions, behavior changes in src/ should have focused regression coverage in tests/.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/responses-parser.test.ts` around lines 164 - 176, Add a focused test
alongside the existing forced hosted web_search test in the responses parser
suite, using tool_choice type "web_search_preview" and asserting
parsed.options.toolChoice equals { name: "web_search" }. Keep the same request
setup and preserve the existing web_search coverage.

Source: Path instructions


test("maps type-only hosted image_generation tool_choice to required image_gen", () => {
const parsed = parseRequest({
model: "claude-opus-4-6",
Expand Down
Loading