Skip to content

Fix ask options schema for strict providers: arrays need items - #21

Closed
Errnolink wants to merge 1 commit into
MYSTRAVIL:mainfrom
Errnolink:fix/ask-options-items
Closed

Errnolink wants to merge 1 commit into
MYSTRAVIL:mainfrom
Errnolink:fix/ask-options-items

Conversation

@Errnolink

Copy link
Copy Markdown
Contributor

What happens

ASK_PARAMETERS declares options: { type: "array" } with no items. Providers that enforce strict JSON Schema validation (Gemini via the antigravity provider is the one we hit) reject the tool manifest outright with a 400 (options: missing field items), so the bridge's ask tool is unusable on those providers.

Fix

options: { type: "array", items: { type: "string" } } — the options payload is always a string list.

Testing

bun test packages/bridge: 94 pass, 0 fail. One-line change, running on our fork since the v0.2.0 rebase with zero fallout.

MYSTRAVIL added a commit that referenced this pull request Sep 27, 2026
…); ask options declare object items for strict providers

Reworked from #20 and #21 by @Errnolink.

Co-authored-by: Errnolink <Errnolink@users.noreply.github.com>
@MYSTRAVIL

Copy link
Copy Markdown
Owner

Thanks, the strict-provider 400 was real. Landed reworked in 769babb (co-authored). items: {type: "string"} would have broken the desk dialog: the shadow ask forwards the model's params unchanged to omp's native ask, whose 18.3 schema is OptionItem = {label, description?, preview?} and whose code reads option.label. String options would reach it with undefined labels. The schema now declares object items with a required label, matching omp; that also satisfies strict validators. I added omp's header field as well.

@MYSTRAVIL MYSTRAVIL closed this Sep 27, 2026
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