Onboard a Provider
Adding an engine, and filling its language table without a hundred manual edits.
Goal: a new translation engine is being wired up. It needs to appear here so callers can resolve codes for it.
1. Add it to provider_credentials first
Provider codes are shared between the two services. Add the vendor and provider to provider_credentials' config/providers.yaml, then use the same code here. A caller resolving a credential there and a language code here should never have to translate between two naming schemes.
If it is console-only for now, add it here anyway and leave in_credentials_catalog false — that is what yandex_translate and pangea_mt do.
2. Create it
Admin → Providers. Code, name, vendor, category (mt / ai / custom_mt), and a fallback policy.
Start with base_language. It is what every other provider uses and it never refuses a pair you have not checked.
3. Add aliases
Whatever else callers might send: a short name (newmt), and any legacy identifier if this replaces something. Any string here resolves to the provider.
4. Fill the language table
Rarely from scratch. Most engines speak a code set close to one already configured:
Provider settings → Copy mappings from another provider → pick the closest one → Copy.
Which one to start from:
| The engine is… | Copy from |
|---|---|
| An LLM taking any BCP-47 tag | openai_api |
| A large MT API with standard tags | google_translate |
| A Chinese-market MT API | baidu_translate or tencent_transmart |
| A customer fine-tune | the vendor whose API serves it |
Copied rows are marked copied:<source> in their source field, so you can tell them from hand-checked ones later.
5. Correct the differences
Matrix → Show → Pinned only shows what you just copied. Walk it against the provider's documentation and fix what differs. Then Show → Derived only for the pairs nothing covers.
Work through the languages you actually sell first.
6. Verify
Tools → Resolve tester, or:
curl ".../v1/providers/newmt_api/languages?effective=true" | jq '.total'
curl ".../v1/resolve?provider=newmt_api&language=pt-BR"
Tightening up later
Once you have recorded which pairs genuinely fail, consider strict — but read Fallback Policies first. The derived count on the coverage table is exactly how many pairs would start answering supported: false.
Next
- Providers and Vendors — the existing catalog
- Editing the Matrix