Skip to content

@jhb.software/payload-content-translator-plugin@0.6.0

Choose a tag to compare

@github-actions github-actions released this 04 Sep 08:03
· 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's data argument and the translatedData it resolves with are typed Record<string, unknown> instead of Record<string, any>. Callers passing a value declared as an interface must widen it (e.g. as Record<string, unknown>) or declare it as a type alias.
  • feat: add anthropicResolver, a translation resolver for Claude (default claude-opus-5). A JSON schema requiring one translation per input index lets the provider reject a merged or dropped entry outright. Leave the optional effort unset for models that reject the field, such as claude-haiku-4-5.
  • feat: add mistralResolver, a translation resolver for Mistral's chat models (default mistral-medium-latest), taking the same chunkLength and instructions options as the OpenAI resolver
  • feat: export createOpenAICompatibleResolver, which builds a resolver for any provider serving OpenAI's /v1/chat/completions endpoint with JSON mode. openAIResolver and mistralResolver are thin wrappers around it.
  • change: resolver error messages and log entries name the provider they came from, so a baseUrl pointing elsewhere no longer reports failures as OpenAI's. The log key openAIresponse is now response.