Skip to content

feat(node): add DeepL translate + write tool node (tool_deepl) #1244

@charliegillet

Description

@charliegillet

Summary

Add an agent-invocable tool node for the DeepL API, from the partner-node priority list (DeepL is pri 2, assigned to @charliegillet).

Two tools:

  • deepl_translatePOST /v2/translate: translate a string or a batch of up to 50 strings; target_lang (regional variants supported), optional source_lang, formality, model_type (latency_optimized / quality_optimized / prefer_quality_optimized), context, preserve_formatting
  • deepl_writePOST /v2/write/rephrase: improve/rephrase text; writing_style XOR tone (the API rejects both together); supports DeepL Write's 11 target languages

Key mechanics:

  • Auth via Authorization: DeepL-Auth-Key <key> header; key from node config or ROCKETRIDE_DEEPL_KEY env var
  • Free/Pro host auto-routing: keys ending :fx route to api-free.deepl.com, others to api.deepl.com
  • Error mapping: 456 = quota exceeded (DeepL-specific), 403 = auth, 429 = rate limit, generic non-2xx surfaces DeepL's own message
  • Follows the tool_tavily pattern (error-dict returns, shared post_with_retry, no new dependencies)

Out of scope (future work): DeepL Voice API (WebSocket streaming; fits a future audio-lane node) and document translation endpoints (multipart upload + polling).

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or enhancement

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions