Repository navigation
@jhb.software/payload-content-translator-plugin@0.6.0
·
42 commits
to main
since this release
- fix: a named tab without source data no longer stops translation of the fields after it
- fix: log traversal and config diagnostics through the Payload logger instead of
console, so they respect the project's log level and formatting - BREAKING:
translateOperation'sdataargument and thetranslatedDatait resolves with are typedRecord<string, unknown>instead ofRecord<string, any>. Callers passing a value declared as aninterfacemust widen it (e.g.as Record<string, unknown>) or declare it as atypealias. - feat: add
anthropicResolver, a translation resolver for Claude (defaultclaude-opus-5). A JSON schema requiring one translation per input index lets the provider reject a merged or dropped entry outright. Leave the optionaleffortunset for models that reject the field, such asclaude-haiku-4-5. - feat: add
mistralResolver, a translation resolver for Mistral's chat models (defaultmistral-medium-latest), taking the samechunkLengthandinstructionsoptions as the OpenAI resolver - feat: export
createOpenAICompatibleResolver, which builds a resolver for any provider serving OpenAI's/v1/chat/completionsendpoint with JSON mode.openAIResolverandmistralResolverare thin wrappers around it. - change: resolver error messages and log entries name the provider they came from, so a
baseUrlpointing elsewhere no longer reports failures as OpenAI's. The log keyopenAIresponseis nowresponse.