Skip to content

Self-improving AI Employees for everyone

docs: record the translate abstraction and retire stale counts

trohitgeed0567b085c
diff --git a/CLAUDE.md b/CLAUDE.md
index e3acf255..5ac95d66 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -32,9 +32,10 @@ This is a React Flow-based workflow automation platform implementing n8n-inspire
| **[GitHub Service](./docs-internal/github_service.md)** | GitHub CLI integration — `githubAction` (repo_clone / pr_create / pr_list / pr_merge / issue_create / issue_list + `custom` passthrough; AI tool `github`). **Strict Stripe pattern: the gh CLI owns its own auth** — no token stored/injected by OpenCompany, no auth pre-flight (gh's own error surfaces), marker OAuth row for the modal badge, fieldless catalogue entry. Login = spawned `gh auth login --hostname github.com --git-protocol https --web` — source-verified: headless takes the `isInteractive=false` branch (no Press-Enter), prints one-time code + `github.com/login/device` URL on stderr; the modal shows the code via the generic `verificationCode` plumbing (`useCredentialPanel` → `OAuthConnect`). `login_env()` strips `GH_TOKEN`/`GITHUB_TOKEN` (login aborts otherwise). Success gate = `gh auth status` exit 0, then best-effort **`gh auth setup-git`** (official bridge — the future git node needs zero auth code). gh binary: **project-local, pooch-driven** (temporal `_install.py` idiom) — pinned release under `package_dir("gh")`, system gh never consulted (auth state still shared: gh config paths are user-level). Palette group `vcs`. |
| **[Cloudflare Service](./docs-internal/cloudflare_service.md)** | Cloudflare CLI integration — `cloudflareAction` (whoami / zones_list / dns_records CRUD / `graphql_query` / `custom` passthrough; AI tool `cloudflare`) wrapping the official `cf` CLI (npm `[email protected]`, technical preview — "the next version of Wrangler"). **Two cf-specific variants of the CLI-managed-auth pattern**: (1) the CLI opens the browser ITSELF (loopback PKCE callback on fixed port 8877) so the login handler proxies nothing — single-flight guard (concurrent logins collide on the fixed port) + never-kill-the-shim invariant (killing the npm `.cmd` wrapper orphans the node child holding 8877); success gate = `cf auth whoami` JSON (`authenticated: true` — cf exits 0 in BOTH auth states). (2) **Fixed 86-scope OAuth grant with no `--scopes` flag** — only `dns_analytics:read` for analytics; no RUM/zone-analytics OAuth scope exists anywhere, so the optional `cloudflare_api_token` field (injected as `CLOUDFLARE_API_TOKEN`, cf's documented first-priority credential) is the only path to Web Analytics/RUM + the GraphQL Analytics API. `graphql_query` op POSTs the official `client/v4/graphql` endpoint directly (outside the OpenAPI schema cf/SDKs are generated from) — the replacement for the sunsetted Zone Analytics REST API; needs `Account > Account Analytics > Read`. Pinned npm install into the shared packages tree, system cf never consulted (preview argv surface drifts across versions). Palette group `deployment`. |
| **[Google Cloud Service](./docs-internal/gcloud_service.md)** | Google Cloud CLI integration — `gcloudAction` (auth/config/projects + set_project / Compute Engine instances list-start-stop-describe / Cloud Run deploy-list-describe / Cloud Storage ls-cp-rm / `custom` passthrough; AI tool `gcloud`) wrapping the official gcloud CLI (pinned versioned archive via pooch into `package_dir("gcloud")` — NOT npm; the Windows bundled-python zip keeps the legacy `google-cloud-sdk-` filename prefix, the `-cli-` spelling 404s, locked by test). Cloudflare login variant (CLI opens the browser itself, random loopback port — no fixed-port hazard) + the gh marker-token pattern; success gate = `gcloud auth list --filter=status:ACTIVE --format=json` non-empty (exit codes never trusted). **Config isolation divergence from gh**: every invocation pins `CLOUDSDK_CONFIG=<DATA_DIR>/gcloud/`, so terminal logins against the operator's global gcloud are deliberately NOT visible to the node. ADC note: node login mints gcloud USER creds only (CLI commands never read ADC); client-library code gets ADC via the `custom` op `auth application-default login` (lands isolated in the pinned dir). Cold install ~100 MB → login answers `pending: True` within the 22 s WS budget. Provider id `gcloud` is orthogonal to the Workspace `google` OAuth2 provider. Palette group `deployment`. |
-| **[Sarvam AI Service](./docs-internal/sarvam_service.md)** | Sarvam AI (Indic-first) — `sarvamChatModel` registered as an **OpenAI-compat provider** (one `_COMPAT_PROVIDERS` entry + a JSON block; no provider subclass) plus three text REST nodes under `nodes/sarvam/` (`sarvamTranslate` / `sarvamTransliterate` / `sarvamDetectLanguage`, palette group `language`). Sarvam's speech endpoints are NOT nodes here — they are one provider inside the abstracted `textToSpeech` / `speechToText` nodes (see **[Speech Provider RFC](./docs-internal/speech_provider_rfc.md)**). **One stored key spans two auth styles** — the chat route takes `Authorization: Bearer` (what the openai SDK sends) while every other endpoint takes only `api-subscription-key`, so `SarvamCredential` declares the native header and every surface shares it. Introduces the generic **`supports_model_listing: false`** flag: Sarvam ships no `/v1/models` route, and unhandled that 404 becomes a `NodeUserError` that `AIService.fetch_models` re-raises *before* its curated fallback, breaking key validation and the model dropdown — so `OpenAIProvider.fetch_models` serves the curated list and probes with a one-token completion instead (defaults `true`; the other 12 providers are untouched, locked by test). Reasoning needs zero Python (`thinking_type: "effort"` + `reasoning_content` are already handled); `thinking_default_on` and `reasoning_models` are deliberately omitted. Also added generic **`Connection.request(files=)`** multipart support (threaded through the auth-retry rebuild), which the speech plugin still relies on. |
+| **[Sarvam AI Service](./docs-internal/sarvam_service.md)** | Sarvam AI (Indic-first). **`nodes/sarvam/` no longer exists** — every capability it served is now a *provider* inside an abstracted node: speech in `nodes/speech/`, and translate / transliterate / detect-language in `nodes/translate/`. What remains Sarvam-specific is `sarvamChatModel` (an **OpenAI-compat provider**: one `_COMPAT_PROVIDERS` entry + a JSON block, no provider subclass) under `nodes/model/`. **One stored key spans two auth styles** — the chat route takes `Authorization: Bearer` (what the openai SDK sends) while every other endpoint takes only `api-subscription-key`, so `SarvamCredential` declares the native header and every surface shares it. Introduces the generic **`supports_model_listing: false`** flag: Sarvam ships no `/v1/models` route, and unhandled that 404 becomes a `NodeUserError` that `AIService.fetch_models` re-raises *before* its curated fallback, breaking key validation and the model dropdown — so `OpenAIProvider.fetch_models` serves the curated list and probes with a one-token completion instead (defaults `true`; the other 12 providers are untouched, locked by test). Also added generic **`Connection.request(files=)`** multipart support. |
| **[Speech Provider RFC](./docs-internal/speech_provider_rfc.md)** | Provider-abstracted speech — two nodes (`textToSpeech`, `speechToText`) with a `provider` dropdown, backed by **two registries, one per direction** (registry membership IS the capability: a synthesis-only vendor simply never appears in the transcription enum). Everything vendor-specific lives in the plugin folder [`server/nodes/speech/`](./server/nodes/speech/) — protocol, registries, dispatch, per-vendor modules; only the generic `services/provider_registry.py` and the vendor-neutral `services/media/` are shared. v1 providers: OpenAI (both directions), ElevenLabs (TTS), Deepgram + Groq (STT), Sarvam (both). Capabilities are JSON (`server/config/speech_defaults.json`) with per-model overrides, so no shared code branches on a provider name. **Audio never travels as bytes** — nodes return an `AudioRef` (a ~400 B reference) because a 12 MB base64 result blows Temporal's 2 MiB blob limit and retries 3× re-billing the provider each time. Backing routes: `GET/POST /api/workspace/{workflow_id}/…` in [`routers/workspace.py`](./server/routers/workspace.py). |
| **[Media Transport](./docs-internal/media_transport.md)** | How files move through the engine, and why they move as **references rather than bytes**. `services/media/` — `AudioRef` (~400 B, `extra="forbid"` so adding a bytes field is a `ValidationError` rather than a silent regression), `write_audio` / `resolve_media` / `coerce_file_param` (the one nodes should call — accepts an `AudioRef`, a bare path, or the legacy base64 envelope), `inspect_audio` (tinytag → stdlib `wave` → PCM arithmetic, **never raises**), and `limits.py`. Containment runs through `resolve_within`, which closed a live vulnerability: a node joined a user path onto the workspace root unchecked, so `audio_file="../../credentials.db"` read the encrypted credential store and uploaded it. **The id/slug asymmetry is the trap** — workspace dirs are named by the mutable `Workflow.slug` while an `AudioRef` stores the immutable `workflow_id` so refs survive rename; `workspace_root()` raises rather than guessing, and the HTTP route owns the lookup. HTTP surface in [`routers/workspace.py`](./server/routers/workspace.py): Range support comes free from Starlette's `FileResponse`, and only `audio/ image/ video/` render inline — `text/html` and `image/svg+xml` are forced to `attachment` because `shell` / `fileDownloader` / `fileModify` can write arbitrary files into a workspace. |
+| **[Translate / Transliterate / Detect](./docs-internal/speech_provider_rfc.md#8-what-this-pattern-should-absorb-next)** | The second application of the multi-vendor pattern, and the one that retired `nodes/sarvam/`. Three nodes (`translateText`, `transliterateText`, `detectLanguage`) in [`server/nodes/translate/`](./server/nodes/translate/), backed by **three registries — one per capability**, because the asymmetry is sharper than speech's: DeepL translates and does nothing else, while Sarvam and LLM-backed providers do all three. Membership makes an unsupported selection unrepresentable rather than a runtime failure inside a paid call. Providers: **deepl** (`Authorization: DeepL-Auth-Key`, `text` is an array, free keys ending `:fx` route to a different host, and it returns `billed_characters` so cost is the provider's own figure), **sarvam** (all three over dedicated REST), **openai** (all three via `ChatUnifier` — proves the Protocol does not care what a provider does internally; billing deliberately NOT recorded because that path bills tokens the LLM layer already costs). Capabilities in `server/config/translate_defaults.json`. |
| **[CI/CD Pipeline](./docs-internal/ci_cd.md)** | GitHub Actions workflows, predeploy validation, release publishing, and composite setup action |
| **[Performance](./docs-internal/performance.md)** | Cold-start measurements (Application startup complete 2.90 s warm, 21.5 s cold post-`company clean` — was 71 s before the 2026-07-14 boot-delay fixes; first WS connect 8.29 s) + warm and cold per-phase timelines + optimisation history (lazy LangChain imports, lazy LLM-SDK exception refs, esbuild sidecar bundle, bytecode-at-build, PartySocket reconnect, TanStack Query auth bootstrap, `manualChunks`, Vite dep-cache preservation, off-loop Temporal build-id hash) + bottleneck inventory + reproduction commands + anti-patterns to never reintroduce (incl. eager SDK import at LLM provider registration, unconditional `.vite` wipe, synchronous `Worker()` on the event loop). Pairs with the build-time pipeline doc below. |
| **[Release Build Pipeline](./docs-internal/release_build_pipeline.md)** | npm-distribution build pipeline: `tsgo` for type-check (5× faster than tsc), Vite `manualChunks` + `target: 'es2022'`, esbuild Node.js sidecar bundle (drops `tsx` interpreter cost), bytecode pre-compile in two halves — `[tool.uv] compile-bytecode = true` (uv sync compiles `.venv/` site-packages) + `python -m compileall` for project source (plain `.pyc`, **no `-O`** — per PEP 488 the non-`-O` runtimes never load `.opt-1.pyc`; excludes `.venv/`, `tests/`). Single source of truth for the bytecode-compile path list: `cli.commands.build.COMPILEALL_SOURCE_DIRS`. |
@@ -210,11 +211,14 @@ server/config/
├── pricing.json # LLM and API pricing config
├── google_apis.json # Google Workspace API endpoints, scopes, OAuth callback paths
├── email_providers.json # IMAP/SMTP provider presets (Gmail, Outlook, Yahoo, iCloud, ProtonMail, Fastmail, custom)
-└── speech_defaults.json # Per-provider TTS/STT capabilities, per-direction, with per-model overrides
+├── speech_defaults.json # Per-provider TTS/STT capabilities, per-direction, with per-model overrides
# ({"whisper-1": [...], "_default": [...]} resolved exact -> longest-prefix ->
# _default). Drives the provider dropdowns, voice/model loaders and validation.
# Boolean flags default PERMISSIVE so a missing declaration never silently
# disables a working feature. Read by nodes/speech/_config.py.
+└── translate_defaults.json # Same shape, three capability blocks per provider (translate /
+ # transliterate / detect). Both files are resolved by the shared
+ # services/plugin/capabilities.CapabilityConfig.
server/nodejs/ # Persistent Node.js server for JS/TS execution
├── package.json # Dependencies: express, tsx
@@ -633,7 +637,7 @@ The project uses WebSocket as the primary communication method between frontend
> The authoritative, per-node reference is the backend plugin registry plus the per-node "logic-flow" cards under [docs-internal/node-logic-flows/](./docs-internal/node-logic-flows/) (one card per node, grouped by category, with handles / params / outputs / side-effects / edge-cases). Live node list = the plugin registry (one folder per node under `server/nodes/<group>/`, 131 node types today via `len(services.node_registry.NODE_METADATA)`; a bare `__init__.py` glob overcounts by also matching the group packages). Do NOT maintain a per-node catalogue here — it drifts on every plugin add.
-Node groups (palette categories): agent, model, skill, tool, trigger, workflow, search, google, android, whatsapp, telegram, twitter, social, email, proxy, chat, scheduler, text, code, document, location, utility, browser, scraper, filesystem, stripe, vercel, github (palette group `vcs`), cloudflare and gcloud (palette group `deployment`), sarvam (palette group `language` — translate / transliterate / detect-language, sharing one API key with `sarvamChatModel`), speech (palette group `language` — provider-abstracted `textToSpeech` / `speechToText`). See [docs-internal/node-logic-flows/](./docs-internal/node-logic-flows/) for the card index.
+Node groups (palette categories): agent, model, skill, tool, trigger, workflow, search, google, android, whatsapp, telegram, twitter, social, email, proxy, chat, scheduler, text, code, document, location, utility, browser, scraper, filesystem, stripe, vercel, github (palette group `vcs`), cloudflare and gcloud (palette group `deployment`), speech and translate (both palette group `language` — provider-abstracted `textToSpeech` / `speechToText` and `translateText` / `transliterateText` / `detectLanguage`; `nodes/sarvam/` was retired into them, and only `sarvamChatModel` under `nodes/model/` remains vendor-named). See [docs-internal/node-logic-flows/](./docs-internal/node-logic-flows/) for the card index.
## Backend Services
diff --git a/docs-internal/ROADMAP.md b/docs-internal/ROADMAP.md
index 3d37d95e..16795e62 100644
--- a/docs-internal/ROADMAP.md
+++ b/docs-internal/ROADMAP.md
@@ -398,7 +398,15 @@ TEMPORAL_TASK_QUEUE=machina-tasks
**Goal**: Comprehensive workflow automation coverage.
-**Status**: COMPLETED - 58 total nodes across 14 categories.
+**Status**: COMPLETED.
+
+> **The node table below is frozen at its 2025 snapshot and is NOT maintained.**
+> It read "58 total nodes across 14 categories" against a live count that has
+> since passed 130. Do not add to it. The authoritative count is
+> `len(services.node_registry.NODE_METADATA)`, and the authoritative list is the
+> plugin registry itself — see [node-logic-flows/](./node-logic-flows/) for
+> per-node cards and `server/nodes/README.md` for the folder map. Kept only as a
+> record of what Phase 9 delivered at the time.
**Implementation**:
diff --git a/docs-internal/node-logic-flows/README.md b/docs-internal/node-logic-flows/README.md
index 28a0dc62..1f8f59ec 100644
--- a/docs-internal/node-logic-flows/README.md
+++ b/docs-internal/node-logic-flows/README.md
@@ -136,11 +136,11 @@ match its doc here, and each doc must still describe what the code does.
Sarvam AI's non-chat REST APIs. The chat models live under `ai_chat_models`
and share the same credential.
-- [Sarvam Detect Language (`sarvamDetectLanguage`)](./language/sarvamDetectLanguage.md)
+- [Detect Language (`detectLanguage`)](./language/detectLanguage.md)
- [Speech to Text (`speechToText`)](./language/speechToText.md)
- [Text to Speech (`textToSpeech`)](./language/textToSpeech.md)
-- [Sarvam Translate (`sarvamTranslate`)](./language/sarvamTranslate.md)
-- [Sarvam Transliterate (`sarvamTransliterate`)](./language/sarvamTransliterate.md)
+- [Translate (`translateText`)](./language/translateText.md)
+- [Transliterate (`transliterateText`)](./language/transliterateText.md)
### search
diff --git a/docs-internal/node-logic-flows/language/detectLanguage.md b/docs-internal/node-logic-flows/language/detectLanguage.md
new file mode 100644
index 00000000..ec4c23d8
--- /dev/null
+++ b/docs-internal/node-logic-flows/language/detectLanguage.md
@@ -0,0 +1,42 @@
+# Detect Language (`detectLanguage`)
+
+| Field | Value |
+|------|-------|
+| **Category** | language |
+| **Backend handler** | [`server/nodes/translate/detect_language.py`](../../../server/nodes/translate/detect_language.py) |
+| **Shared helpers** | [`_base.py`](../../../server/nodes/translate/_base.py), [`_unifier.py`](../../../server/nodes/translate/_unifier.py), [`_providers/`](../../../server/nodes/translate/_providers/) |
+| **Capabilities config** | [`server/config/translate_defaults.json`](../../../server/config/translate_defaults.json) |
+| **Tests** | [`server/tests/nodes/test_translate.py`](../../../server/tests/nodes/test_translate.py) |
+| **Skill (if any)** | [`server/skills/language_agent/translation-skill/SKILL.md`](../../../server/skills/language_agent/translation-skill/SKILL.md) |
+| **Dual-purpose tool** | yes |
+
+## Purpose
+
+Identify which language a piece of text is written in, and in which script.
+Replaces `sarvamDetectLanguage`.
+
+## Parameters
+
+| Name | Type | Default | Description |
+|------|------|---------|-------------|
+| `provider` | enum | registry-driven | `detect_providers()` — `sarvam` / `openai` |
+| `text` | string | - | Text to identify (required) |
+| `detect_model` | string | provider default | Loader `detectModels` |
+| `provider_options` | object | `{}` | Vendor-specific |
+
+## Outputs
+
+`language`, `script`, `confidence` (from providers that report it),
+`provider`, `request_id`.
+
+## Edge cases
+
+- **Confidence is `None` when the provider does not report one** — never
+ fabricated. Sarvam returns a language and script but no score.
+- Detection on a single word is unreliable regardless of provider; the skill
+ says to give it a sentence.
+
+## Related
+
+- **Peer nodes**: the other two nodes in [`nodes/translate/`](../../../server/nodes/translate/).
+- **Pattern**: [Speech Provider RFC §8](../../speech_provider_rfc.md#8-the-pattern-generalised-nodestranslate)
diff --git a/docs-internal/node-logic-flows/language/sarvamDetectLanguage.md b/docs-internal/node-logic-flows/language/sarvamDetectLanguage.md
deleted file mode 100644
index 4f1a532a..00000000
--- a/docs-internal/node-logic-flows/language/sarvamDetectLanguage.md
+++ /dev/null
@@ -1,97 +0,0 @@
-# Sarvam Detect Language (`sarvamDetectLanguage`)
-
-| Field | Value |
-|------|-------|
-| **Category** | language |
-| **Backend handler** | [`server/nodes/sarvam/sarvam_detect_language.py`](../../../server/nodes/sarvam/sarvam_detect_language.py) |
-| **Shared helpers** | [`server/nodes/sarvam/_base.py`](../../../server/nodes/sarvam/_base.py) (`post_json`, `track_sarvam_usage`) |
-| **Tests** | [`server/tests/nodes/test_sarvam.py`](../../../server/tests/nodes/test_sarvam.py) |
-| **Skill (if any)** | [`server/skills/language_agent/sarvam-translate-skill/SKILL.md`](../../../server/skills/language_agent/sarvam-translate-skill/SKILL.md) |
-| **Dual-purpose tool** | yes — tool name `sarvam_detect_language` |
-
-## Purpose
-
-Identify which Indian language a piece of text is written in and in which
-script, via Sarvam's `/text-lid` endpoint. Typically used to route a message
-to the right handler, or to supply an explicit `source_language_code` to a
-downstream translate call.
-
-## Inputs (handles)
-
-| Handle | Connection type | Required | Purpose |
-|--------|-----------------|----------|---------|
-| `input-main` | main | no | Upstream data injected into params |
-
-## Parameters
-
-| Name | Type | Default | Required | displayOptions.show | Description |
-|------|------|---------|----------|---------------------|-------------|
-| `input` | string | - | yes | - | Text to classify (max 1000 characters) |
-
-## Outputs (handles)
-
-| Handle | Shape | Description |
-|--------|-------|-------------|
-| `output-main` | object | Standard envelope payload |
-
-### Output payload
-
-```ts
-{
- language_code: string | null; // en-IN hi-IN bn-IN gu-IN kn-IN ml-IN mr-IN od-IN pa-IN ta-IN te-IN
- script_code: string | null; // Latn Deva Beng Gujr Knda Mlym Orya Guru Taml Telu
- request_id: string | null;
-}
-```
-
-Both classification fields are `Optional` on the output model **by design** —
-Sarvam returns nulls for text it cannot classify, and coercing those to `""`
-would hide the failure from downstream nodes.
-
-## Logic Flow
-
-```mermaid
-flowchart TD
- A[Receive params] --> B{len input > 1000?}
- B -- yes --> X[NodeUserError w/ actual length]
- B -- no --> C[ctx.connection sarvam -> POST /text-lid]
- C -- status >= 400 --> Y[NodeUserError w/ Sarvam message]
- C -- ok --> D[track_sarvam_usage detect_language, len input]
- D --> E[Return SarvamDetectLanguageOutput incl. possible nulls]
-```
-
-## Decision Logic
-
-- **Validation**: input over 1000 characters short-circuits before the HTTP
- call with the actual length in the message.
-- **Null passthrough**: an unclassifiable result is a *successful* envelope
- with null fields, not an error. Callers must check before chaining.
-- **Error paths**: non-2xx becomes `NodeUserError` with Sarvam's own message.
-
-## Side Effects
-
-- **Database writes**: one `api_usage_metrics` row per call (characters).
-- **Broadcasts**: standard node status only.
-- **External API calls**: `POST https://api.sarvam.ai/text-lid`, `api-subscription-key` header.
-- **File I/O**: none.
-- **Subprocess**: none.
-
-## External Dependencies
-
-- **Credentials**: `SarvamCredential` via `ctx.connection("sarvam")`.
-- **Python packages**: `httpx` (through `Connection`).
-
-## Edge cases & known limits
-
-- **Nulls are normal.** Short or ambiguous input returns `language_code: null`
- and `script_code: null`. Feeding that straight into `sarvamTranslate` as a
- source language will fail — check first, or pass `auto`.
-- 1000-character hard cap; sample or truncate longer text rather than looping.
-- Covers 11 languages, fewer than translate's 22.
-- Cheapest of the Sarvam text APIs (3.5 INR / 10K characters).
-
-## Related
-
-- **Skills using this as a tool**: `sarvam-translate-skill`.
-- **Downstream nodes**: [`sarvamTranslate`](./sarvamTranslate.md) (pass the detected code as `source_language_code`).
-- **Architecture docs**: [Sarvam AI Service](../../sarvam_service.md).
diff --git a/docs-internal/node-logic-flows/language/sarvamTranslate.md b/docs-internal/node-logic-flows/language/sarvamTranslate.md
deleted file mode 100644
index 1a28238e..00000000
--- a/docs-internal/node-logic-flows/language/sarvamTranslate.md
+++ /dev/null
@@ -1,107 +0,0 @@
-# Sarvam Translate (`sarvamTranslate`)
-
-| Field | Value |
-|------|-------|
-| **Category** | language |
-| **Backend handler** | [`server/nodes/sarvam/sarvam_translate.py`](../../../server/nodes/sarvam/sarvam_translate.py) |
-| **Shared helpers** | [`server/nodes/sarvam/_base.py`](../../../server/nodes/sarvam/_base.py) (`post_json`, `track_sarvam_usage`) |
-| **Tests** | [`server/tests/nodes/test_sarvam.py`](../../../server/tests/nodes/test_sarvam.py) |
-| **Skill (if any)** | [`server/skills/language_agent/sarvam-translate-skill/SKILL.md`](../../../server/skills/language_agent/sarvam-translate-skill/SKILL.md) |
-| **Dual-purpose tool** | yes — tool name `sarvam_translate` |
-
-## Purpose
-
-Translate text between English and 22 Indian languages via Sarvam's
-`/translate` endpoint. Supports formal, colloquial and code-mixed registers,
-optional gendered inflection, and output-script control (native, Roman, or
-spoken form). Distinct from `sarvamTransliterate`, which changes script
-without changing language.
-
-## Inputs (handles)
-
-| Handle | Connection type | Required | Purpose |
-|--------|-----------------|----------|---------|
-| `input-main` | main | no | Upstream data injected into params |
-
-## Parameters
-
-| Name | Type | Default | Required | displayOptions.show | Description |
-|------|------|---------|----------|---------------------|-------------|
-| `input` | string | - | yes | - | Text to translate |
-| `source_language_code` | enum | `auto` | no | - | `auto` + the 22 language codes |
-| `target_language_code` | enum | `hi-IN` | no | - | The 22 language codes (no `auto`) |
-| `model` | enum | `sarvam-translate:v1` | no | - | `sarvam-translate:v1` (22 langs, 2000 chars) / `mayura:v1` (1000 chars) |
-| `mode` | enum | `formal` | no | - | `formal` / `modern-colloquial` / `classic-colloquial` / `code-mixed` |
-| `speaker_gender` | enum\|null | `null` | no | - | `Male` / `Female` |
-| `output_script` | enum\|null | `null` | no | - | `roman` / `fully-native` / `spoken-form-in-native` |
-| `numerals_format` | enum | `international` | no | - | `international` / `native` |
-
-Language codes: `as-IN bn-IN brx-IN doi-IN en-IN gu-IN hi-IN kn-IN kok-IN
-ks-IN mai-IN ml-IN mni-IN mr-IN ne-IN od-IN pa-IN sa-IN sat-IN sd-IN ta-IN
-te-IN ur-IN`.
-
-## Outputs (handles)
-
-| Handle | Shape | Description |
-|--------|-------|-------------|
-| `output-main` | object | Standard envelope payload |
-
-### Output payload
-
-```ts
-{
- translated_text: string;
- source_language_code: string; // detected when input was 'auto'
- request_id: string | null;
-}
-```
-
-## Logic Flow
-
-```mermaid
-flowchart TD
- A[Receive params] --> B{len input > model cap?}
- B -- yes --> X[NodeUserError with actual length + cap]
- B -- no --> C{source == target?}
- C -- yes --> X
- C -- no --> D[Build body, strip None values]
- D --> E[ctx.connection sarvam -> POST /translate]
- E -- status >= 400 --> Y[NodeUserError w/ Sarvam message]
- E -- ok --> F[track_sarvam_usage translate, len input]
- F --> G[Return SarvamTranslateOutput]
-```
-
-## Decision Logic
-
-- **Validation**: input over the per-model character cap, and an identical
- source/target pair, both short-circuit before the HTTP call — no paid call
- is burned on a guaranteed no-op.
-- **`None` stripping**: `post_json` drops unset optionals rather than sending
- explicit nulls; Sarvam 422s on several of those.
-- **Error paths**: non-2xx becomes `NodeUserError` carrying Sarvam's own
- `error.message` (or `message` / `detail`), prefixed with the status code.
-
-## Side Effects
-
-- **Database writes**: one `api_usage_metrics` row per call (characters as `resource_count`).
-- **Broadcasts**: standard node status only.
-- **External API calls**: `POST https://api.sarvam.ai/translate`, `api-subscription-key` header.
-- **File I/O**: none.
-- **Subprocess**: none.
-
-## External Dependencies
-
-- **Credentials**: `SarvamCredential` (`nodes/model/_credentials.py`) via `ctx.connection("sarvam")`.
-- **Python packages**: `httpx` (through `Connection`).
-
-## Edge cases & known limits
-
-- Caps are per model: 1000 chars for `mayura:v1`, 2000 for `sarvam-translate:v1`. Split on sentence boundaries for longer text — splitting mid-sentence degrades quality.
-- `mayura:v1` covers only 10 languages despite the shared enum; an unsupported pair returns a Sarvam 422 surfaced verbatim.
-- Usage is billed per character; transliteration has no separately published rate and is priced identically in `pricing.json`.
-
-## Related
-
-- **Skills using this as a tool**: `sarvam-translate-skill`.
-- **Peer nodes**: [`sarvamTransliterate`](./sarvamTransliterate.md), [`sarvamDetectLanguage`](./sarvamDetectLanguage.md).
-- **Architecture docs**: [Sarvam AI Service](../../sarvam_service.md).
diff --git a/docs-internal/node-logic-flows/language/sarvamTransliterate.md b/docs-internal/node-logic-flows/language/sarvamTransliterate.md
deleted file mode 100644
index 6f4cc7d3..00000000
--- a/docs-internal/node-logic-flows/language/sarvamTransliterate.md
+++ /dev/null
@@ -1,102 +0,0 @@
-# Sarvam Transliterate (`sarvamTransliterate`)
-
-| Field | Value |
-|------|-------|
-| **Category** | language |
-| **Backend handler** | [`server/nodes/sarvam/sarvam_transliterate.py`](../../../server/nodes/sarvam/sarvam_transliterate.py) |
-| **Shared helpers** | [`server/nodes/sarvam/_base.py`](../../../server/nodes/sarvam/_base.py) (`post_json`, `track_sarvam_usage`) |
-| **Tests** | [`server/tests/nodes/test_sarvam.py`](../../../server/tests/nodes/test_sarvam.py) |
-| **Skill (if any)** | [`server/skills/language_agent/sarvam-translate-skill/SKILL.md`](../../../server/skills/language_agent/sarvam-translate-skill/SKILL.md) |
-| **Dual-purpose tool** | yes — tool name `sarvam_transliterate` |
-
-## Purpose
-
-Convert text between scripts while preserving pronunciation — romanised Hindi
-("namaste") to Devanagari ("नमस्ते") and back. **This is not translation**:
-the words and meaning are unchanged, only the writing system. Optionally
-expands numerals and abbreviations into spoken form, which is useful when the
-output feeds `textToSpeech`.
-
-## Inputs (handles)
-
-| Handle | Connection type | Required | Purpose |
-|--------|-----------------|----------|---------|
-| `input-main` | main | no | Upstream data injected into params |
-
-## Parameters
-
-| Name | Type | Default | Required | displayOptions.show | Description |
-|------|------|---------|----------|---------------------|-------------|
-| `input` | string | - | yes | - | Text to transliterate |
-| `source_language_code` | enum | `auto` | no | - | `auto` + the 11 core codes |
-| `target_language_code` | enum | `hi-IN` | no | - | The 11 core codes |
-| `numerals_format` | enum | `international` | no | - | `international` / `native` |
-| `spoken_form` | boolean | `false` | no | - | Expand numbers / dates / abbreviations as spoken |
-| `spoken_form_numerals_language` | enum | `native` | no | `spoken_form: [true]` | `english` / `native` |
-
-Language codes: `bn-IN en-IN gu-IN hi-IN kn-IN ml-IN mr-IN od-IN pa-IN ta-IN
-te-IN` (a narrower set than `sarvamTranslate`).
-
-## Outputs (handles)
-
-| Handle | Shape | Description |
-|--------|-------|-------------|
-| `output-main` | object | Standard envelope payload |
-
-### Output payload
-
-```ts
-{
- transliterated_text: string;
- source_language_code: string;
- request_id: string | null;
-}
-```
-
-## Logic Flow
-
-```mermaid
-flowchart TD
- A[Receive params] --> B{source == target?}
- B -- yes --> X[NodeUserError]
- B -- no --> C[Build body; spoken_form_numerals_language only when spoken_form]
- C --> D[ctx.connection sarvam -> POST /transliterate]
- D -- status >= 400 --> Y[NodeUserError w/ Sarvam message]
- D -- ok --> E[track_sarvam_usage transliterate, len input]
- E --> F[Return SarvamTransliterateOutput]
-```
-
-## Decision Logic
-
-- **Validation**: identical source/target short-circuits before the HTTP call.
-- **Conditional field**: `spoken_form_numerals_language` is set to `None` (and
- therefore stripped by `post_json`) unless `spoken_form` is true, so the API
- never receives a meaningless pairing.
-- **Error paths**: non-2xx becomes `NodeUserError` with Sarvam's own message.
-
-## Side Effects
-
-- **Database writes**: one `api_usage_metrics` row per call (characters).
-- **Broadcasts**: standard node status only.
-- **External API calls**: `POST https://api.sarvam.ai/transliterate`, `api-subscription-key` header.
-- **File I/O**: none.
-- **Subprocess**: none.
-
-## External Dependencies
-
-- **Credentials**: `SarvamCredential` via `ctx.connection("sarvam")`.
-- **Python packages**: `httpx` (through `Connection`).
-
-## Edge cases & known limits
-
-- Narrower language set than translate — 11 codes, not 22.
-- No published per-character rate; `pricing.json` prices it as translation.
-- Easy to reach for by mistake: if the goal is changing *language*, use
- [`sarvamTranslate`](./sarvamTranslate.md). The skill spells out the
- distinction for the LLM.
-
-## Related
-
-- **Skills using this as a tool**: `sarvam-translate-skill`.
-- **Peer nodes**: [`sarvamTranslate`](./sarvamTranslate.md), [`textToSpeech`](./textToSpeech.md) (a common downstream consumer of spoken-form output).
-- **Architecture docs**: [Sarvam AI Service](../../sarvam_service.md).
diff --git a/docs-internal/node-logic-flows/language/translateText.md b/docs-internal/node-logic-flows/language/translateText.md
new file mode 100644
index 00000000..d7da8bfa
--- /dev/null
+++ b/docs-internal/node-logic-flows/language/translateText.md
@@ -0,0 +1,54 @@
+# Translate (`translateText`)
+
+| Field | Value |
+|------|-------|
+| **Category** | language |
+| **Backend handler** | [`server/nodes/translate/translate_text.py`](../../../server/nodes/translate/translate_text.py) |
+| **Shared helpers** | [`_base.py`](../../../server/nodes/translate/_base.py), [`_unifier.py`](../../../server/nodes/translate/_unifier.py), [`_providers/`](../../../server/nodes/translate/_providers/) |
+| **Capabilities config** | [`server/config/translate_defaults.json`](../../../server/config/translate_defaults.json) |
+| **Tests** | [`server/tests/nodes/test_translate.py`](../../../server/tests/nodes/test_translate.py) |
+| **Skill (if any)** | [`server/skills/language_agent/translation-skill/SKILL.md`](../../../server/skills/language_agent/translation-skill/SKILL.md) |
+| **Dual-purpose tool** | yes |
+
+## Purpose
+
+Translate text through any configured provider. Replaces the vendor-locked
+`sarvamTranslate`: the provider is a parameter, so switching from Sarvam to
+DeepL never means swapping the node out of a workflow.
+
+## Parameters
+
+| Name | Type | Default | Description |
+|------|------|---------|-------------|
+| `provider` | enum | registry-driven | `translate_providers()` — `deepl` / `sarvam` / `openai` |
+| `text` | string | - | Text to translate (required) |
+| `target_language` | string | provider default | Loader `translateLanguages` |
+| `source_language` | string | auto-detect | Loader `translateSourceLanguages` |
+| `translate_model` | string | provider default | **Not** `model` — see below |
+| `formality` | string | - | Register; DeepL formality options / Sarvam modes, unified |
+| `context` | string | - | Disambiguating context, not itself translated |
+| `preserve_formatting` | boolean | false | Keep line breaks and punctuation |
+| `provider_options` | object | `{}` | Vendor-specific, passed through untouched |
+
+## Outputs
+
+`translated_text`, `detected_source_language`, `provider`, `translate_model`,
+`request_id`.
+
+## Edge cases
+
+- **DeepL free vs pro hosts.** A free key ends `:fx` and the pro host rejects
+ it with an unhelpful 403. The provider selects the host from the key, so a
+ user never has to know which tier they hold.
+- **DeepL reports `billed_characters`**, and the node bills that rather than
+ counting input — it matches the invoice.
+- **Sarvam per-model caps** (`mayura:v1` 1000 chars, `sarvam-translate:v1`
+ 2000) are enforced before the call, so the LLM gets an actionable message
+ instead of an opaque 422.
+- **LLM-backed provider records no cost**: it bills tokens, already costed by
+ the LLM layer.
+
+## Related
+
+- **Peer nodes**: the other two nodes in [`nodes/translate/`](../../../server/nodes/translate/).
+- **Pattern**: [Speech Provider RFC §8](../../speech_provider_rfc.md#8-the-pattern-generalised-nodestranslate)
diff --git a/docs-internal/node-logic-flows/language/transliterateText.md b/docs-internal/node-logic-flows/language/transliterateText.md
new file mode 100644
index 00000000..201dd931
--- /dev/null
+++ b/docs-internal/node-logic-flows/language/transliterateText.md
@@ -0,0 +1,51 @@
+# Transliterate (`transliterateText`)
+
+| Field | Value |
+|------|-------|
+| **Category** | language |
+| **Backend handler** | [`server/nodes/translate/transliterate_text.py`](../../../server/nodes/translate/transliterate_text.py) |
+| **Shared helpers** | [`_base.py`](../../../server/nodes/translate/_base.py), [`_unifier.py`](../../../server/nodes/translate/_unifier.py), [`_providers/`](../../../server/nodes/translate/_providers/) |
+| **Capabilities config** | [`server/config/translate_defaults.json`](../../../server/config/translate_defaults.json) |
+| **Tests** | [`server/tests/nodes/test_translate.py`](../../../server/tests/nodes/test_translate.py) |
+| **Skill (if any)** | [`server/skills/language_agent/translation-skill/SKILL.md`](../../../server/skills/language_agent/translation-skill/SKILL.md) |
+| **Dual-purpose tool** | yes |
+
+## Purpose
+
+Convert text between writing systems **without translating it**. Replaces
+`sarvamTransliterate`.
+
+The distinction the node exists to preserve: transliteration changes the
+script while the words stay the same (`namaste` → `नमस्ते`), where translation
+changes the words (`hello` → `नमस्ते`). Both produce Devanagari; only one
+changed the meaning. The tool description states this explicitly because
+confusing the two is the most common misuse.
+
+## Parameters
+
+| Name | Type | Default | Description |
+|------|------|---------|-------------|
+| `provider` | enum | registry-driven | `transliterate_providers()` — `sarvam` / `openai`. **DeepL is absent and unselectable.** |
+| `text` | string | - | Text to convert (required) |
+| `target_language` | string | provider default | Loader `transliterateLanguages` |
+| `source_language` | string | auto-detect | Loader `transliterateSourceLanguages` |
+| `target_script` | string | - | Loader `transliterateScripts` |
+| `transliterate_model` | string | provider default | |
+| `provider_options` | object | `{}` | Vendor-specific |
+
+## Outputs
+
+`transliterated_text`, `provider`, `transliterate_model`, `request_id`.
+
+## Edge cases
+
+- **`spoken-form-in-native`** renders numbers and abbreviations the way they
+ would be *spoken* — the right choice when the output feeds `textToSpeech`.
+- **DeepL cannot be selected here.** Not merely undocumented: it registers
+ only into the translate registry, so an attempt is refused up front with a
+ message listing the providers that can.
+
+## Related
+
+- **Peer nodes**: the other two nodes in [`nodes/translate/`](../../../server/nodes/translate/).
+- **Pattern**: [Speech Provider RFC §8](../../speech_provider_rfc.md#8-the-pattern-generalised-nodestranslate)
diff --git a/docs-internal/sarvam_service.md b/docs-internal/sarvam_service.md
index 37fc52c7..2a6b97b4 100644
--- a/docs-internal/sarvam_service.md
+++ b/docs-internal/sarvam_service.md
@@ -1,5 +1,28 @@
# Sarvam AI Service
+> **`server/nodes/sarvam/` no longer exists.** Every capability it served is now
+> a *provider* inside an abstracted node, so a workflow picks Sarvam from a
+> dropdown rather than picking a Sarvam-specific node:
+>
+> | Was | Now |
+> |---|---|
+> | `sarvamTranslate` | `translateText` with `provider: "sarvam"` |
+> | `sarvamTransliterate` | `transliterateText` with `provider: "sarvam"` |
+> | `sarvamDetectLanguage` | `detectLanguage` with `provider: "sarvam"` |
+> | `sarvamTextToSpeech` | `textToSpeech` with `provider: "sarvam"` |
+> | `sarvamSpeechToText` | `speechToText` with `provider: "sarvam"` |
+>
+> The wire logic was ported verbatim into
+> [`nodes/translate/_providers/sarvam.py`](../server/nodes/translate/_providers/sarvam.py)
+> and [`nodes/speech/_providers/sarvam.py`](../server/nodes/speech/_providers/sarvam.py).
+> `sarvamChatModel` under `nodes/model/` is untouched and remains vendor-named,
+> which is correct — chat models are selected by name.
+>
+> This page is retained for the Sarvam-specific API detail (auth, language
+> vocabulary, per-model caps, the INR pricing conversion), which is still
+> accurate and still lives in those provider modules. For the pattern, see the
+> [Speech Provider RFC](./speech_provider_rfc.md).
+
Indic-first AI: two chat models plus five REST APIs for translation,
transliteration, language identification, speech-to-text and text-to-speech.
@@ -15,7 +38,7 @@ different auth styles**. Its chat endpoint is OpenAI-compatible and accepts
| **Auth** | `api-subscription-key: <key>`; the chat route also accepts `Authorization: Bearer <key>` |
| **Credential class** | [`SarvamCredential`](../server/nodes/model/_credentials.py) (`_LLMApiKey` → `ApiKeyCredential`) |
| **Chat plugin** | [`server/nodes/model/sarvam_chat_model/`](../server/nodes/model/sarvam_chat_model/) |
-| **Service plugins** | [`server/nodes/sarvam/`](../server/nodes/sarvam/) |
+| **Service plugins** | Retired — now providers in [`nodes/translate/_providers/sarvam.py`](../server/nodes/translate/_providers/sarvam.py) and [`nodes/speech/_providers/sarvam.py`](../server/nodes/speech/_providers/sarvam.py) |
| **Palette groups** | `model` (chat), `language` (services) |
| **Official docs** | <https://docs.sarvam.ai> |
@@ -133,7 +156,7 @@ models.
---
-## Service nodes — `server/nodes/sarvam/`
+## Service capabilities (historical layout: `server/nodes/sarvam/`)
Five stateless REST nodes, palette group `language`, all
`usable_as_tool = True` and `TaskQueue.REST_API`. There is no `_service.py`:
@@ -259,7 +282,7 @@ Everything Sarvam touches, for reference when adding the next provider:
| File | Locks |
|---|---|
| [`tests/llm/test_model_listing_fallback.py`](../server/tests/llm/test_model_listing_fallback.py) | The `supports_model_listing` contract both ways, incl. that Sarvam is the only opt-out and every other provider still calls `models.list()` |
-| [`tests/nodes/test_sarvam.py`](../server/tests/nodes/test_sarvam.py) | All five nodes: happy paths, `None`-stripping, per-model caps, v2/v3 param gating, TTS file-vs-base64 and multi-chunk, STT dual-shaped input |
+| [`tests/nodes/test_translate.py`](../server/tests/nodes/test_translate.py) + [`test_speech.py`](../server/tests/nodes/test_speech.py) | Sarvam is covered as a *provider* now: native auth header, single-input body shape, per-model caps, v2/v3 param gating, and the base64-array TTS response |
| [`tests/services/test_connection_multipart.py`](../server/tests/services/test_connection_multipart.py) | `Connection.request(files=)` incl. the auth-retry replay |
| `tests/llm/test_provider_self_registration.py` | Sarvam in the compat matrix + its pinned `base_url` |
| `tests/llm/test_live_providers.py` | Opt-in live smoke, gated on `SARVAM_API_KEY` |
diff --git a/docs-internal/speech_provider_rfc.md b/docs-internal/speech_provider_rfc.md
index 7514a338..f41b8634 100644
--- a/docs-internal/speech_provider_rfc.md
+++ b/docs-internal/speech_provider_rfc.md
@@ -328,45 +328,46 @@ come back null here.
---
-## 8. What this pattern should absorb next
-
-Speech was the first capability to get a provider abstraction, not the only one
-that needs it. The same vendor-locked shape it replaced is still present
-elsewhere, and the argument against it is identical: a second vendor means a
-second node, a third means a third, and the user has to rewire the canvas to
-switch.
-
-**Outstanding, in the same palette group:**
-
-| Node | Capability | Other vendors that serve it |
-|---|---|---|
-| `sarvamTranslate` | text translation | Google Translate, DeepL, Azure Translator, any LLM |
-| `sarvamTransliterate` | script transliteration | Google, Azure, ICU/`uroman` locally |
-| `sarvamDetectLanguage` | language identification | Google, Azure, `lingua`/`fasttext` locally, any LLM |
-
-A `nodes/translate/` plugin would be a near-mechanical port of `nodes/speech/`:
-`_protocol.py` (one `TranslateProvider` Protocol — this capability is
-unidirectional, so **one** registry, not two), `_config.py` over a
-`translate_defaults.json`, `_unifier.py`, `_providers/`, and a
-`credentials = (...)` tuple. No new framework, and none of the media transport
-applies — translation returns text, so `AudioRef` and the workspace routes are
-not involved.
-
-Two things make it *easier* than speech was:
-
-- **No binary transport.** The whole `services/media` half of this RFC is moot.
-- **Language-detection and transliteration are the same provider surface** as
- translation for most vendors, so one `_providers/<vendor>.py` typically serves
- all three nodes.
-
-One thing makes it *harder*: several plausible providers are LLMs rather than
-dedicated translation APIs, so the provider module would call `ChatUnifier`
-rather than raw httpx. That is a supported shape — the Protocol does not care
-what a provider does internally — but it means the `credential_id` for those
-entries points at an existing LLM credential and the billing unit is tokens,
-not characters.
-
-**Not started, and deliberately not scoped here.** Recorded so the
-inconsistency is visible rather than discovered later: `nodes/sarvam/` is now
-the only folder in the repo where a vendor name appears in a node `type` for a
-capability several vendors serve.
+## 8. The pattern generalised: `nodes/translate/`
+
+Written as "what this should absorb next"; done in the following change, which
+retired `nodes/sarvam/` entirely. Recorded here because the differences are the
+interesting part — they are what a third application should expect to vary.
+
+**Three registries, not two.** Speech splits by *direction* because a vendor may
+do only synthesis or only transcription. Translate splits by *capability*, and
+the asymmetry is sharper: DeepL translates and offers neither transliteration
+nor language identification, while Sarvam and any LLM do all three. The rule
+held: membership is the capability, and a test asserts DeepL is absent from the
+other two registries rather than merely undocumented there.
+
+**No media transport at all.** Text results are small, so every constraint in
+§2 — the reason `AudioRef` exists, the workspace routes, the containment work —
+simply does not apply. The whole `services/media` half of this RFC is speech's
+alone.
+
+**A provider that is not an HTTP client.** `_providers/llm.py` prompts a chat
+model through `ChatUnifier` and satisfies the same three Protocols as Sarvam's
+REST client. Structural typing meant this needed no accommodation. Its billing
+is deliberately *not* recorded: that path bills tokens, already costed by the
+LLM layer, and recording characters here too would double-count the same call.
+
+**Two more things became shared rather than copied**, both under
+`services/plugin/` where the framework owns them:
+
+- `capabilities.CapabilityConfig` — the JSON-backed per-provider/per-model
+ resolution ladder. `nodes/speech/_config.py` became a thin instance over it
+ and its tests passed untouched.
+- `params.coerce_blank_params` — the panel-blank coercion. Written for speech,
+ needed verbatim by translate, which is the point at which it stopped being
+ plugin code.
+
+That is the same D6 argument applied twice more: the second consumer is when a
+mechanism gets extracted, not the first.
+
+### Still vendor-named
+
+`sarvamChatModel`, under `nodes/model/`. That one is correct as-is — chat models
+are *selected by name* by users and agents, and the LLM layer already abstracts
+them; a "chat model" node with a provider dropdown is what `nodes/model/`
+collectively already is.
diff --git a/server/nodes/README.md b/server/nodes/README.md
index 733be911..f922e4f7 100644
--- a/server/nodes/README.md
+++ b/server/nodes/README.md
@@ -132,12 +132,14 @@ vercel/ — Vercel (CLI deploy / inspect / list / custom passthrough)
github/ — GitHub (gh CLI: clone / PRs / issues / custom; palette group "vcs")
cloudflare/ — Cloudflare (cf CLI: zones / DNS / GraphQL analytics / custom; palette group "deployment")
gcloud/ — Google Cloud (gcloud CLI: projects / Compute Engine / Cloud Run / Cloud Storage / custom; palette group "deployment")
-sarvam/ — Sarvam AI text REST APIs (translate / transliterate / detect_language; palette
- group "language"). Its chat models are a separate plugin at model/sarvam_chat_model/
- and share one SarvamCredential; its SPEECH endpoints are a provider inside speech/.
speech/ — Provider-abstracted text_to_speech / speech_to_text (palette group "language").
One node per direction with a `provider` dropdown, not one node per vendor. Owns
its own protocol / registries / dispatch / per-vendor modules — see below.
+translate/ — Provider-abstracted translate / transliterate / detect_language (palette group
+ "language"). Same shape as speech/ but THREE registries, one per capability:
+ DeepL translates only, Sarvam and LLM-backed providers do all three.
+ (Sarvam's chat model remains a separate plugin at model/sarvam_chat_model/;
+ nodes/sarvam/ itself was retired — every capability it served is now a provider.)
```
---
@@ -153,7 +155,7 @@ these first before writing new code:
| `agent/` | `_inline.prepare_agent_call` | One-shot pre-dispatch for every agent (memory + skill + tool + teammate collection) |
| `agent/` | `_specialized.SpecializedAgentBase` | Base for 13 specialized agents |
| `model/` | `_base.ChatModelBase` | 12 chat models inherit → same `@Operation("chat")` body that calls `ai_service.execute_chat` |
-| `sarvam/` | `_base.post_json` / `_base.post_multipart` / `_base.track_sarvam_usage` | 5 stateless REST nodes share one `api-subscription-key` connection, `None`-stripping request builder, and manual usage tracking (no `_service.py` — nothing long-lived to own) |
+| `speech/` + `translate/` | `_config` / `_registry` / `_unifier` / `_providers/` | The multi-vendor shape. Capability data is JSON (`services/plugin/capabilities.CapabilityConfig`), registration is `services/provider_registry`, and each `_providers/<vendor>.py` owns that vendor's auth scheme, request transport and response shape |
| `android/` | `_base.AndroidServiceBase` | 16 Android services inherit; payload translation + `SERVICE_ID_MAP` lives on this base |
| `android/` | `_base.execute_android_service_tool` | AI-tool dispatcher — called from `services/handlers/tools.py` for direct service tools (the `androidTool` aggregator + `execute_android_toolkit` were retired) |
| `code/` | `_base.CodeExecutorBase` + `_nodejs.NodeJSClient` | Python/JS/TS executors; `monty_executor/` is sandboxed Python via `pydantic-monty` (enforced limits + opt-in capabilities) |