Skip to content

New tag_handling_version parameter not supported #151

Closed

Description

@KenSentMe

The DeepL API now supports the tag_handling_version parameter. However, this parameter is not yet supported by this package.

Activity

  1. JanEbbing commented on Dec 1, 2025

    @JanEbbing
    Contributor

    Sorry we have not documented this well yet (in progress). You can use it as follows:

    import deepl
    
    auth_key = "f63c02c5-f056-..."  # Replace with your key
    deepl_client = deepl.DeepLClient(auth_key)
    
    deepl_client.translate_text("<div>How are you?</div>", target_lang="DE", tag_handling="xml", model_type="quality_optimized", extra_body_parameters={"tag_handling_version": "v2"})
    
  2. JanEbbing commented on Dec 1, 2025

    @JanEbbing
    Contributor

    This might not be a permanent parameter in our API, so I'm hesitant to add it to our client libraries.

  3. KenSentMe commented on Dec 2, 2025

    @KenSentMe
    Author

    Thank you for the clarification. Is your hesitation because the improved tag handling might become default in the future, making this version setting obsolete?

  4. JanEbbing commented on Dec 2, 2025

    @JanEbbing
    Contributor

    Yes exactly, that is our intention.

  5. KenSentMe commented on Dec 2, 2025

    @KenSentMe
    Author

    Perfect. For now I'm going to use the extra_body_parameters method, since I see some weird behavior on line breaks when using the default tag handler.

  6. JanEbbing commented on Dec 29, 2025

    @JanEbbing
    Contributor

    We added this as a top level parameter in the end, see README. Im closing here for now.

  7. KenSentMe commented on Jan 8, 2026

    @KenSentMe
    Author

    Perfect, thanks for the heads up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions