Skip to content

feat: support model output modality lists - #473

Merged
sjungwon03 merged 1 commit into
mainfrom
feat/472-model-output-filters
Oct 6, 2026
Merged

sjungwon03 merged 1 commit into
mainfrom
feat/472-model-output-filters

Conversation

@sjungwon03

Copy link
Copy Markdown
Member

Closes #472

GET /api/v1/models previously rejected documented output_modalities=text,image. It now accepts one to nine distinct exact output modalities as one comma-separated value and selects any matching captured published output after enabled model AND final-provider IAM. Standalone all and omitted-filter behavior are preserved. Different fields retain conjunction; search/order/paging and fixed relative continuations keep validated list order. Input/parameter multi-values remain unsupported.

Red evidence: 38 new public regressions initially produced14 expected failures (valid lists returned400) and24 invariant passes; four new actual SDK socket cases all failed on gateway400 before production edits. Green evidence: all42 new cases and186 focused discovery tests pass. Coverage includes both route kinds, all nine outputs, union/reversed order/no-match, missing/empty metadata, combined search/order/filters, filter-only501 rows, exact continuation encoding, authentication, model/provider/implicit/explicit Deny and fresh SDK page denial, malformed whole-catalog metadata, required audit/catalog failures, source mutation and sanitized operational records. Installed OpenRouter1.4.18 injects default paging; OpenAI7.23.0 retains filter-only requests. Ten added successful SDK requests exercise union, iteration and policy changes.

Official guide and credential-free official list observations support output union; that semantic evidence is distinct from the existing plain-string structural pin. Duplicate rejection and finite vocabulary bounds are explicit local restrictions (upstream accepts duplicates). Omitted filters still have no implicit text default. All three source pins remain byte-identical. Published metadata can be stale and cannot guarantee selected-provider capability. Offset pages can shift with current policy/catalog; there is no snapshot guarantee. Rich OpenRouter SDK metadata requirements, input/parameter lists, other discovery filters, metadata refresh, complete #116 and unresolved #7 remain open. Listing still invokes no inference, route, secret, limit or usage ports.

Plan: 472-model-output-filters. Contract: model-output-filters.

Validation: full npm run check passes strict typing, lint, 5595 tests with one existing PostgreSQL skip, planning/contracts and offline schema integrity. Full #116 remains open.

Assisted-by: Codex

Refs: #472
Assisted-by: Codex
Signed-off-by: sjungwon03 <sjungwon03@gmail.com>
@github-actions
github-actions Bot requested a review from sjungwon03-ai October 6, 2026 05:40
@github-actions github-actions Bot added ai-review-requested Review requested from sjungwon03-ai type:feature Product capability labels Oct 6, 2026

@sjungwon03-ai sjungwon03-ai left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed the exact published diff at 4ea8f84 against main and confirmed byte identity with the locally validated change. No blocking findings.

The query parser accepts only distinct allowlisted output values, standalone all and one key; the captured list is frozen. Any-member metadata matching occurs after enabled model/final-provider IAM and before the existing search/order/paging output handoff. Fixed continuations retain only validated scalar values. Whole-catalog validation, fresh authorization on subsequent requests, required sanitized audit, no inference-side ports and metadata capture remain unchanged. Unsupported input/parameter lists and legacy queries still reject.

Public red evidence reproduced14 valid-list failures; all four new installed SDK cases independently reproduced gateway400. All42 added cases are green,186 focused discovery tests pass and full npm run check passes5595 tests with one existing PostgreSQL skip, strict typing, lint, document/fixture checks and all three unchanged schema pins. Both required exact-head check jobs passed. Existing invalid-output regression is replaced with an unknown-item case and new union/invalid-list cases cover the newly accepted behavior rather than deleting rejection coverage.

The plan and contracts explicitly distinguish documented/empirically verified output union from local uniqueness/vocabulary restrictions and the source's plain-string schema. Stale metadata, selected-provider capability, mutable offset pages, other list semantics and full release certification remain open. No new database, dependency, arbitrary destination or irreversible product choice is introduced.

Reviewed by Codex operating as sjungwon03-ai, as explicitly authorized by the contributor. Assisted-by: Codex.

@sjungwon03
sjungwon03 merged commit 96b462c into main Oct 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review-requested Review requested from sjungwon03-ai type:feature Product capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: support bounded model output modality lists

2 participants