Skip to content

feat(providers): declare imageToText serviceKind on major vision providers - #10275

Merged
diegosouzapw merged 5 commits into
release/v3.8.50from
feat/imagetotext-service-kinds
Aug 14, 2026
Merged

diegosouzapw merged 5 commits into
release/v3.8.50from
feat/imagetotext-service-kinds

Conversation

@diegosouzapw

Copy link
Copy Markdown
Owner

Summary

The /dashboard/media-providers/imageToText category was empty by design: imageToText is a declared-only serviceKind (no backing registry in open-sse/config/mediaServiceKinds.ts) and no catalog entry declared it — so the tab showed "No providers configured for this kind yet" on every installation.

This PR declares serviceKinds: ["llm", "imageToText"] on the 7 major vision-capable providers:

  • openai, anthropic, gemini, xai, groq, mistral (frontier-labs.ts)
  • openrouter (gateways.ts)

Effects:

  • The Image-to-Text category now lists these providers.
  • Their provider detail pages render the Modality Bridge shortcut to ?tab=vision (MediaProviderPageClient.tsx case imageToText), which was previously unreachable — closing the one unverifiable item of the Modality Bridge UI checklist.

Why "llm" is declared alongside

ProviderCard.tsx treats an empty serviceKinds as "regular LLM provider" (inline Test button + playground default). Declaring only imageToText would silently hide the Test button on these 7 majors. The new test guards this contract.

Validation (TDD)

  • tests/unit/imagetotext-service-kinds.test.ts — RED first (0/2), GREEN after the catalog edits (2/2):
    • each of the 7 providers resolves imageToText via resolveProviderServiceKinds;
    • each still declares llm (Test-button regression guard).
  • Sibling suites green: provider-service-kind-filter-4240, minimax-media-servicekinds, providers-constants-split, check-provider-consistency (23/23).
  • npm run check:provider-consistency — OK (259 REGISTRY entries, 339 canonical providers).
  • npm run typecheck:core — exit 0.
  • Prettier + ESLint clean on the 3 touched files.

⚠️ base-red inherited: #9985 (2 ESLint errors introduced by #10240/#9448 — unrelated to this diff)

Refs #9760

…iders

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
diegosouzapw pushed a commit that referenced this pull request Aug 14, 2026
…iceKinds

Same rebaseline as #10275 (frozen 1250 -> 1252): this branch adds the chutes
serviceKinds declaration, the second of the two data lines.
…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
diegosouzapw force-pushed the feat/imagetotext-service-kinds branch from 8d8b06a to ddcb840 Compare August 14, 2026 14:04
diegosouzapw pushed a commit that referenced this pull request Aug 14, 2026
…iceKinds

Same rebaseline as #10275 (frozen 1250 -> 1252): this branch adds the chutes
serviceKinds declaration, the second of the two data lines.
@diegosouzapw
diegosouzapw merged commit 236afb3 into release/v3.8.50 Aug 14, 2026
22 checks passed
@diegosouzapw
diegosouzapw deleted the feat/imagetotext-service-kinds branch August 14, 2026 16:13
diegosouzapw added a commit that referenced this pull request Aug 14, 2026
…ts.ocr seed (#10400)

* feat(ocr): transformation layer on ocrRegistry (Mistral shape canonical)

* feat(ocr): Azure Document Intelligence provider (prebuilt-read, analyze+poll)

* feat(ocr): generic dispatch with per-provider transformation and DI poll loop

* test(ocr): align sanitized-500 assert with HR#12 error sanitization

The test's own title ("returns a sanitized 500") describes the new
behavior mandated by HR#12 (never leak err.message in a response body).
The old regex asserted the pre-sanitization leak (`OCR request failed:
socket closed`) as expected output, which contradicted its own title
and the sanitization this task intentionally introduced in
open-sse/handlers/ocr.ts. Scoped to this single assertion only.

* fix(ocr): fail fast on non-ok poll responses instead of misleading 504

pollOcrOperation now checks pollRes.ok and returns a sanitized 502
immediately (logging the upstream status via console.error) instead of
looping until the 30-attempt cap and surfacing a misleading timeout for
what was actually an auth/upstream error during polling.

* feat(ocr): route/docs for multi-provider /v1/ocr

- Route: map the connection's providerSpecificData.baseUrl onto
  credentials.baseUrl (resolveOcrCredentials) so azure-document-intelligence
  connections resolve their endpoint the same way every other custom-endpoint
  provider does (src/lib/providers/validation/*); previously handleOcr only
  saw a baseUrl when a caller set it directly, so the DB-backed Azure
  connection endpoint was never forwarded.
- v1OcrSchema.model is already a free-form string, no schema change needed.
- Docs: add the /v1/ocr provider table + example + Azure poll-flow note to
  API_REFERENCE.md, and describe the provider/model prefix + async poll
  behavior in openapi.yaml.
- Test: tests/unit/ocr-route-contract.test.ts covers getAllOcrModels/
  parseOcrModel for both providers and resolveOcrCredentials's mapping.

* feat(providers): derive imageToText serviceKind from the OCR registry

* feat(providers): chutes imageToText (dots.ocr seed)

* chore(quality): rebaseline gateways.ts file-size for imageToText serviceKinds

Same rebaseline as #10275 (frozen 1250 -> 1252): this branch adds the chutes
serviceKinds declaration, the second of the two data lines.

* chore(quality): rebaseline deadExports for the OCR/image-to-text series

---------

Co-authored-by: Xiangzhe <bakryun0718@proton.me>
@diegosouzapw diegosouzapw mentioned this pull request Aug 15, 2026
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>
tkgo11 pushed a commit to tkgo11/OmniRoute that referenced this pull request Sep 23, 2026
…ts.ocr seed (diegosouzapw#10400)

* feat(ocr): transformation layer on ocrRegistry (Mistral shape canonical)

* feat(ocr): Azure Document Intelligence provider (prebuilt-read, analyze+poll)

* feat(ocr): generic dispatch with per-provider transformation and DI poll loop

* test(ocr): align sanitized-500 assert with HR#12 error sanitization

The test's own title ("returns a sanitized 500") describes the new
behavior mandated by HR#12 (never leak err.message in a response body).
The old regex asserted the pre-sanitization leak (`OCR request failed:
socket closed`) as expected output, which contradicted its own title
and the sanitization this task intentionally introduced in
open-sse/handlers/ocr.ts. Scoped to this single assertion only.

* fix(ocr): fail fast on non-ok poll responses instead of misleading 504

pollOcrOperation now checks pollRes.ok and returns a sanitized 502
immediately (logging the upstream status via console.error) instead of
looping until the 30-attempt cap and surfacing a misleading timeout for
what was actually an auth/upstream error during polling.

* feat(ocr): route/docs for multi-provider /v1/ocr

- Route: map the connection's providerSpecificData.baseUrl onto
  credentials.baseUrl (resolveOcrCredentials) so azure-document-intelligence
  connections resolve their endpoint the same way every other custom-endpoint
  provider does (src/lib/providers/validation/*); previously handleOcr only
  saw a baseUrl when a caller set it directly, so the DB-backed Azure
  connection endpoint was never forwarded.
- v1OcrSchema.model is already a free-form string, no schema change needed.
- Docs: add the /v1/ocr provider table + example + Azure poll-flow note to
  API_REFERENCE.md, and describe the provider/model prefix + async poll
  behavior in openapi.yaml.
- Test: tests/unit/ocr-route-contract.test.ts covers getAllOcrModels/
  parseOcrModel for both providers and resolveOcrCredentials's mapping.

* feat(providers): derive imageToText serviceKind from the OCR registry

* feat(providers): chutes imageToText (dots.ocr seed)

* chore(quality): rebaseline gateways.ts file-size for imageToText serviceKinds

Same rebaseline as diegosouzapw#10275 (frozen 1250 -> 1252): this branch adds the chutes
serviceKinds declaration, the second of the two data lines.

* 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>
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…ts.ocr seed (diegosouzapw#10400)

* feat(ocr): transformation layer on ocrRegistry (Mistral shape canonical)

* feat(ocr): Azure Document Intelligence provider (prebuilt-read, analyze+poll)

* feat(ocr): generic dispatch with per-provider transformation and DI poll loop

* test(ocr): align sanitized-500 assert with HR#12 error sanitization

The test's own title ("returns a sanitized 500") describes the new
behavior mandated by HR#12 (never leak err.message in a response body).
The old regex asserted the pre-sanitization leak (`OCR request failed:
socket closed`) as expected output, which contradicted its own title
and the sanitization this task intentionally introduced in
open-sse/handlers/ocr.ts. Scoped to this single assertion only.

* fix(ocr): fail fast on non-ok poll responses instead of misleading 504

pollOcrOperation now checks pollRes.ok and returns a sanitized 502
immediately (logging the upstream status via console.error) instead of
looping until the 30-attempt cap and surfacing a misleading timeout for
what was actually an auth/upstream error during polling.

* feat(ocr): route/docs for multi-provider /v1/ocr

- Route: map the connection's providerSpecificData.baseUrl onto
  credentials.baseUrl (resolveOcrCredentials) so azure-document-intelligence
  connections resolve their endpoint the same way every other custom-endpoint
  provider does (src/lib/providers/validation/*); previously handleOcr only
  saw a baseUrl when a caller set it directly, so the DB-backed Azure
  connection endpoint was never forwarded.
- v1OcrSchema.model is already a free-form string, no schema change needed.
- Docs: add the /v1/ocr provider table + example + Azure poll-flow note to
  API_REFERENCE.md, and describe the provider/model prefix + async poll
  behavior in openapi.yaml.
- Test: tests/unit/ocr-route-contract.test.ts covers getAllOcrModels/
  parseOcrModel for both providers and resolveOcrCredentials's mapping.

* feat(providers): derive imageToText serviceKind from the OCR registry

* feat(providers): chutes imageToText (dots.ocr seed)

* chore(quality): rebaseline gateways.ts file-size for imageToText serviceKinds

Same rebaseline as diegosouzapw#10275 (frozen 1250 -> 1252): this branch adds the chutes
serviceKinds declaration, the second of the two data lines.

* chore(quality): rebaseline deadExports for the OCR/image-to-text series

---------

Co-authored-by: Xiangzhe <bakryun0718@proton.me>
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