feat(providers): derive imageToText from the OCR registry + chutes dots.ocr seed - #10291
Closed
diegosouzapw wants to merge 9 commits into
Closed
diegosouzapw wants to merge 9 commits into
diegosouzapw wants to merge 9 commits into
Conversation
…totext-derivation
#10373) The `instanceof Response` guard from #10256 broke two ways: 1. `instanceof` is nominal against `globalThis.Response`, but proxyFetch dispatches through the npm undici package's fetch, whose Response is a different class — so valid upstream responses were rejected as contract violations. Replaced with `isResponseLike()` (instanceof fast path + structural brand/member probe); genuinely malformed shapes still throw. 2. The thrown error had no `.status`, so it fell through to chatCore's BAD_GATEWAY default — an internal defect was treated as a flaky provider, cooling the connection down and retrying forever. It now carries status 500 + `executor_contract_violation`, registered as request-scoped and terminal (no cooldown, no breaker, no retry). batch_api.test.ts went from exit 124 (infinite hang, pinning Unit shard 4/4 in every open PR) to exit 0, 22/22 passing. Closes #10360
`CustomModelEntry` never declared `outputTokenLimit`, but the DB persists it (src/lib/db/models.ts) and the catalog reads it (src/app/api/v1/models/catalog.ts), producing TS2551 under the open-sse typecheck gate. Verified locally against release/v3.8.50 @ 90458a6: TS2551 count in models/catalog.ts goes 2 -> 0, and model-token-limit-catalog.test.ts passes 5/5 with the added max_output_tokens projection assertion.
…overlay contract (#10383) #10248 changed the contract: a custom row for an id that already exists is the operator-owned overlay for that model (catalog.ts:1330) — its explicitly stored fields win over discovered metadata and the merged entry is flagged `custom`. Before #10248 the duplicate was skipped, so the test asserted `custom === false` and started failing. The stale expectation is corrected (not weakened) and an identity assertion is added: the overlay must keep the catalog id rather than becoming a detached entry. models-catalog-route.test.ts: 44 pass, 0 fail (was 43 pass / 1 fail).
diegosouzapw
pushed a commit
that referenced
this pull request
Aug 14, 2026
…iceKinds The two serviceKinds declarations (openrouter here, chutes in #10291) add exactly two data lines to the provider catalog. Frozen 1250 -> 1252 with the justification recorded in the baseline key.
diegosouzapw
pushed a commit
that referenced
this pull request
Aug 14, 2026
…iceKinds The two serviceKinds declarations (openrouter here, chutes in #10291) add exactly two data lines to the provider catalog. Frozen 1250 -> 1252 with the justification recorded in the baseline key.
…iceKinds Same rebaseline as #10275 (frozen 1250 -> 1252): this branch adds the chutes serviceKinds declaration, the second of the two data lines.
diegosouzapw
force-pushed
the
feat/imagetotext-derivation
branch
from
August 14, 2026 14:04
3a4736d to
ef4ef47
Compare
diegosouzapw
added a commit
that referenced
this pull request
Aug 14, 2026
…iders (#10275) * feat(providers): declare imageToText serviceKind on major vision providers The /dashboard/media-providers/imageToText category was empty by design: imageToText has no backing registry and no catalog entry declared it. Declare serviceKinds: ["llm", "imageToText"] on the 7 major vision-capable providers (openai, anthropic, gemini, openrouter, mistral, xai, groq) so the category lists them and the Modality Bridge ?tab=vision shortcut becomes reachable from their provider detail pages. "llm" is declared alongside because ProviderCard treats an EMPTY serviceKinds as "regular LLM provider" — declaring only imageToText would silently hide the inline Test button and the playground default (guarded by the new test). Refs #9760 * chore(quality): rebaseline gateways.ts file-size for imageToText serviceKinds The two serviceKinds declarations (openrouter here, chutes in #10291) add exactly two data lines to the provider catalog. Frozen 1250 -> 1252 with the justification recorded in the baseline key. * chore(quality): rebaseline deadExports for the OCR/image-to-text series --------- Co-authored-by: Xiangzhe <bakryun0718@proton.me>
Owner
Author
11 tasks done
yawar-aquil
added a commit
to yawar-aquil/OmniRoute
that referenced
this pull request
Aug 19, 2026
…tion
Adding the tabitoken gateway grows src/shared/constants/providers/apikey/
gateways.ts from 1255 to 1270 lines, over its frozen size. The growth is
+15 data lines and is entirely this PR's own diff, reproducible on this
branch alone -- so it is not the combination drift that WS5.5 reserves for
the release captain, and it must not be pushed onto the release branch.
Extraction is not an available alternative here: the file is pure data
("Pure data; merged by apikey/index.ts via spread" in its own header) and
is already decomposed into 6 family files under apikey/, so one new gateway
entry is irreducible growth.
Rebaselined with a justification note, following the precedent already in
this file for the same path: _rebaseline_2026_08_14_imagetotext_servicekinds
(diegosouzapw#10275/diegosouzapw#10291, gateways.ts 1250->1255, data lines only) and
_rebaseline_2026_08_11_v3850_merge_storm_provider_registry.
tkgo11
pushed a commit
to tkgo11/OmniRoute
that referenced
this pull request
Sep 23, 2026
…iders (diegosouzapw#10275) * feat(providers): declare imageToText serviceKind on major vision providers The /dashboard/media-providers/imageToText category was empty by design: imageToText has no backing registry and no catalog entry declared it. Declare serviceKinds: ["llm", "imageToText"] on the 7 major vision-capable providers (openai, anthropic, gemini, openrouter, mistral, xai, groq) so the category lists them and the Modality Bridge ?tab=vision shortcut becomes reachable from their provider detail pages. "llm" is declared alongside because ProviderCard treats an EMPTY serviceKinds as "regular LLM provider" — declaring only imageToText would silently hide the inline Test button and the playground default (guarded by the new test). Refs diegosouzapw#9760 * chore(quality): rebaseline gateways.ts file-size for imageToText serviceKinds The two serviceKinds declarations (openrouter here, chutes in diegosouzapw#10291) add exactly two data lines to the provider catalog. Frozen 1250 -> 1252 with the justification recorded in the baseline key. * chore(quality): rebaseline deadExports for the OCR/image-to-text series --------- Co-authored-by: Xiangzhe <bakryun0718@proton.me>
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…iders (diegosouzapw#10275) * feat(providers): declare imageToText serviceKind on major vision providers The /dashboard/media-providers/imageToText category was empty by design: imageToText has no backing registry and no catalog entry declared it. Declare serviceKinds: ["llm", "imageToText"] on the 7 major vision-capable providers (openai, anthropic, gemini, openrouter, mistral, xai, groq) so the category lists them and the Modality Bridge ?tab=vision shortcut becomes reachable from their provider detail pages. "llm" is declared alongside because ProviderCard treats an EMPTY serviceKinds as "regular LLM provider" — declaring only imageToText would silently hide the inline Test button and the playground default (guarded by the new test). Refs diegosouzapw#9760 * chore(quality): rebaseline gateways.ts file-size for imageToText serviceKinds The two serviceKinds declarations (openrouter here, chutes in diegosouzapw#10291) add exactly two data lines to the provider catalog. Frozen 1250 -> 1252 with the justification recorded in the baseline key. * chore(quality): rebaseline deadExports for the OCR/image-to-text series --------- Co-authored-by: Xiangzhe <bakryun0718@proton.me>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR-D (final) of the OCR/image-to-text migration series (plan:
_tasks/superpowers/plans/2026-08-13-ocr-image-to-text-migration.md; heuristic pattern from aisbf, implemented in this repo's registry-derived style).feat/ocr-multi-provider) — this PR targets that branch because the derivation test covers theazure-document-intelligenceprovider it introduces. After #10283 merges, retarget torelease/v3.8.50(gh pr edit --base release/v3.8.50+ verify with--json baseRefName). The diff shown here is only the 2 commits of this PR.imageToTextderived from the OCR registry (open-sse/config/mediaServiceKinds.ts): any provider registered inOCR_PROVIDERSnow resolves theimageToTextserviceKind automatically —mistralandazure-document-intelligenceappear in/dashboard/media-providers/imageToTextwith no manual catalog edit, and future OCR providers surface on registration (no drift). Complements feat(providers): declare imageToText serviceKind on major vision providers #10275, which declares the kind on the 7 major vision LLM providers.serviceKinds: ["llm", "imageToText"]on thechutesgateway entry (hostsrednote-hilab/dots.ocr— cheap OCR-specialized model, 131k ctx; arrives via model discovery since chutes ispassthroughModels: true, so no static registry entry)."llm"declared alongside for the same ProviderCard reason as feat(providers): declare imageToText serviceKind on major vision providers #10275.Validation (TDD)
imagetotext-derivation3/3: mistral + azure derive withdeclared: undefined; groq withundefineddoes NOT (isolates derivation from feat(providers): declare imageToText serviceKind on major vision providers #10275's declarations); chutes resolves bothimageToTextandllm.provider-service-kind-filter-4240,minimax-media-servicekinds(16 total).check:provider-consistencyOK (259 registry entries, 339 canonical providers) ·typecheck:core0 · eslint/prettier clean.serviceKindIndex.tsmemoization verified safe: derivation is a pure function ofproviderIdover the constantOCR_PROVIDERSmap.