Skip to content

[Feat] Add custom request fields for OpenAI-compatible providers - #1350

Open
zoomote[bot] wants to merge 12 commits into
mainfrom
roomote/openai-extra-body-visual-baseline
Open

[Feat] Add custom request fields for OpenAI-compatible providers#1350
zoomote[bot] wants to merge 12 commits into
mainfrom
roomote/openai-extra-body-visual-baseline

Conversation

@zoomote

@zoomote zoomote Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

​Created by Roomote. Follow up by mentioning @roomote, in the web UI, or in Discord.

What changed

OpenAI-compatible provider profiles now include a localized Extra Body JSON editor for provider-specific request fields. Zoo Code validates the JSON, rejects runtime-managed and prototype-sensitive keys, persists it only for OpenAI-compatible profiles, and merges safe fields into streaming, non-streaming, O-family, and single-completion requests.

The settings control uses VS Code-themed components, accessible validation feedback, translations for every supported locale, and unclipped full-height visual baselines for dark, light, high-contrast, and high-contrast-light themes. The visual tests apply each theme after the shared gallery mount so every baseline exercises its intended VS Code theme.

The changed-code mutation runner now discovers related tests through each package's Vitest binary, and focused assertions cover the Extra Body copy, placeholder, ARIA relationships, reserved-key formatting, and non-OpenAI bypass required by the current mutation gate on main.

Why this change was made

Providers such as Sail Research require request-body metadata to select features such as the balanced completion window. Custom headers cannot express those fields, so users previously needed a proxy. This closes #1104.

Impact

Users can configure provider-specific fields such as { "metadata": { "completion_window": "balanced" } } directly in an OpenAI-compatible profile without allowing custom JSON to override Zoo Code's model, messages, tools, streaming, reasoning, temperature, or token limits.

Related PRs

@codecov

codecov Bot commented Aug 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@edelauna
edelauna marked this pull request as ready for review August 28, 2026 01:11
@edelauna
edelauna force-pushed the roomote/openai-extra-body-visual-baseline branch from 97e9415 to 5bf75a2 Compare August 28, 2026 01:11
@github-actions github-actions Bot added awaiting-review PR changes are ready and waiting for maintainer re-review has-conflicts PR has merge conflicts with the base branch and removed awaiting-review PR changes are ready and waiting for maintainer re-review has-conflicts PR has merge conflicts with the base branch labels Aug 28, 2026
@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Review process

This PR was opened by an automated account. A human maintainer must verify the change intent, provenance, and validation before merging.

  1. Required CI checks pass.
  2. The workflow starts CodeRabbit automatically.
  3. For eligible human-authored PRs, CodeRabbit reviews and approves the latest commit.
  4. A human maintainer reviews and approves after CodeRabbit.

Current step: Ready for human maintainer review and approval.

@github-actions github-actions Bot added awaiting-review PR changes are ready and waiting for maintainer re-review has-conflicts PR has merge conflicts with the base branch awaiting-maintainer CodeRabbit approved; waiting for a human maintainer and removed has-conflicts PR has merge conflicts with the base branch awaiting-review PR changes are ready and waiting for maintainer re-review awaiting-maintainer CodeRabbit approved; waiting for a human maintainer labels Aug 29, 2026
@github-actions github-actions Bot added awaiting-maintainer CodeRabbit approved; waiting for a human maintainer has-conflicts PR has merge conflicts with the base branch and removed awaiting-maintainer CodeRabbit approved; waiting for a human maintainer has-conflicts PR has merge conflicts with the base branch labels Sep 1, 2026
@zoomote
zoomote Bot force-pushed the roomote/openai-extra-body-visual-baseline branch from 5bf75a2 to 97874aa Compare September 2, 2026 00:45
@github-actions github-actions Bot added has-conflicts PR has merge conflicts with the base branch and removed awaiting-maintainer CodeRabbit approved; waiting for a human maintainer labels Sep 2, 2026
@zoomote
zoomote Bot force-pushed the roomote/openai-extra-body-visual-baseline branch from 97874aa to 227a179 Compare September 2, 2026 01:08
@github-actions github-actions Bot added awaiting-maintainer CodeRabbit approved; waiting for a human maintainer and removed has-conflicts PR has merge conflicts with the base branch labels Sep 2, 2026
@zoomote

zoomote Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto current main and pushed 6b437a1. Fixed the gallery theme-order regression, refreshed all five authoritative OpenAI-compatible baselines, repaired package-local mutation-test discovery from the newly merged gate, and strengthened focused tests until changed-code mutation testing had no surviving or uncovered mutants. All current CI checks pass, including webview/extension-host visuals, all four theme fixtures, mutation testing, Ubuntu, Windows, E2E, compile, translations, CodeQL, and Codecov. The PR is mergeable and now awaits human maintainer review/approval. Delegated browser proof was not used because it exceeded the shared proof deadline.

@zoomote
zoomote Bot force-pushed the roomote/openai-extra-body-visual-baseline branch from 227a179 to d491902 Compare September 3, 2026 03:18
@github-actions github-actions Bot removed the awaiting-maintainer CodeRabbit approved; waiting for a human maintainer label Sep 3, 2026
@zoomote
zoomote Bot force-pushed the roomote/openai-extra-body-visual-baseline branch from 9b78833 to 2423f86 Compare September 3, 2026 03:36
@github-actions github-actions Bot added the awaiting-maintainer CodeRabbit approved; waiting for a human maintainer label Sep 3, 2026
@github-actions github-actions Bot added awaiting-maintainer CodeRabbit approved; waiting for a human maintainer and removed awaiting-maintainer CodeRabbit approved; waiting for a human maintainer labels Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-maintainer CodeRabbit approved; waiting for a human maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Support custom request body parameters (extra_body) for API providers

2 participants