From 4c3a0db1218a70819841707804367659b8dfe1e2 Mon Sep 17 00:00:00 2001 From: Xiangzhe Date: Thu, 13 Aug 2026 17:51:57 -0300 Subject: [PATCH] feat(providers): chutes imageToText (dots.ocr seed) --- src/shared/constants/providers/apikey/gateways.ts | 4 ++++ tests/unit/imagetotext-derivation.test.ts | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/src/shared/constants/providers/apikey/gateways.ts b/src/shared/constants/providers/apikey/gateways.ts index 860117943d..c9c3ceeffb 100644 --- a/src/shared/constants/providers/apikey/gateways.ts +++ b/src/shared/constants/providers/apikey/gateways.ts @@ -932,6 +932,10 @@ export const APIKEY_PROVIDERS_GATEWAYS = { "No free tier as of 2026 — Chutes moved to pay-as-you-go (free Early Access ended 2026-03).", authHint: "Bearer API key for the Chutes OpenAI-compatible gateway.", passthroughModels: true, + // dots.ocr (rednote-hilab/dots.ocr) is served via Chutes discovery — no static + // model entry needed (passthroughModels). Declare imageToText alongside llm + // (declaring serviceKinds means "llm" must be explicit too, see #10275). + serviceKinds: ["llm", "imageToText"], }, // Factory AI ("Factory Droids") subscription gateway — the same backend the // local `droid` CLI shells into, exposed here as an OpenAI-compatible HTTP diff --git a/tests/unit/imagetotext-derivation.test.ts b/tests/unit/imagetotext-derivation.test.ts index 1074d42b7b..59cfad7db8 100644 --- a/tests/unit/imagetotext-derivation.test.ts +++ b/tests/unit/imagetotext-derivation.test.ts @@ -1,6 +1,7 @@ import { test } from "node:test"; import assert from "node:assert/strict"; import { resolveProviderServiceKinds } from "../../open-sse/config/mediaServiceKinds.ts"; +import { AI_PROVIDERS } from "../../src/shared/constants/providers.ts"; test("OCR-registry providers derive imageToText without manual declaration", () => { assert.ok(resolveProviderServiceKinds("mistral", undefined).includes("imageToText")); @@ -12,3 +13,9 @@ test("OCR-registry providers derive imageToText without manual declaration", () test("non-OCR providers do not gain imageToText implicitly", () => { assert.ok(!resolveProviderServiceKinds("groq", undefined).includes("imageToText")); }); + +test("chutes declares llm + imageToText (dots.ocr seed, served via passthrough discovery)", () => { + const kinds = resolveProviderServiceKinds("chutes", AI_PROVIDERS.chutes.serviceKinds); + assert.ok(kinds.includes("imageToText")); + assert.ok(kinds.includes("llm")); +});