Skip to content

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

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

[Feat] Add custom request fields for OpenAI-compatible providers#1350
zoomote[bot] wants to merge 5 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 authoritative visual baselines for dark, light, high-contrast, and high-contrast-light themes.

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

❌ Patch coverage is 86.66667% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...components/settings/providers/OpenAICompatible.tsx 72.72% 1 Missing and 2 partials ⚠️
webview-ui/src/utils/validate.ts 85.71% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

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.

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

1 participant