Skip to content

feat: Add Integration for translated's Lara model#2848

Merged
bogdankostic merged 17 commits intomainfrom
lara-integration
Feb 24, 2026
Merged

feat: Add Integration for translated's Lara model#2848
bogdankostic merged 17 commits intomainfrom
lara-integration

Conversation

@bogdankostic
Copy link
Copy Markdown
Contributor

@bogdankostic bogdankostic commented Feb 17, 2026

Proposed Changes:

This PR adds the Lara integration for Haystack. Lara is an adaptive translation API (by translated) that combines LLM-style fluency with low hallucination and latency, and supports domain adaptation via context, instructions, translation memories, and glossaries.

Lara documentation: https://support.laratranslate.com/en
Lara SDK documentation: https://developers.laratranslate.com/docs/introduction

How did you test it?

I added unit tests and an integration test.

Notes for the reviewer

  • For the integration test to run in the CI, we need to add the API keys to GitHub.
  • We need to create the python package lara-haystack

Checklist

@bogdankostic bogdankostic requested a review from a team as a code owner February 17, 2026 13:14
@bogdankostic bogdankostic requested review from davidsbatista and removed request for a team February 17, 2026 13:14
@github-actions github-actions Bot added the type:documentation Improvements or additions to documentation label Feb 17, 2026
@anakin87
Copy link
Copy Markdown
Member

@bogdankostic I'll help review this PR.

Could you please create a GitHub issue using this template? This would help track the work needed for this new integration (in addition to this PR).

Copy link
Copy Markdown
Member

@anakin87 anakin87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a first pass. I left several comments but overall it's looking good.

Comment thread .github/workflows/lara.yml Outdated
Comment thread .github/workflows/lara.yml Outdated
Comment thread integrations/lara/pydoc/config_docusaurus.yml Outdated
Comment thread integrations/lara/pyproject.toml Outdated
Comment thread integrations/lara/pyproject.toml Outdated
Comment on lines +264 to +293
@classmethod
def from_dict(cls, data: dict[str, Any]) -> "LaraDocumentTranslator":
"""
Deserializes a LaraDocumentTranslator from a dictionary.

:param data: Dictionary containing the LaraDocumentTranslator configuration.
:return: LaraDocumentTranslator instance.
"""
deserialize_secrets_inplace(data["init_parameters"], keys=["access_key_id", "access_key_secret"])
return default_from_dict(cls, data)

def to_dict(self) -> dict[str, Any]:
"""
Serializes a LaraDocumentTranslator to a dictionary.

:return: Dictionary containing the LaraDocumentTranslator configuration.
"""
return default_to_dict(
self,
access_key_id=self.access_key_id.to_dict(),
access_key_secret=self.access_key_secret.to_dict(),
source_lang=self.source_lang,
target_lang=self.target_lang,
context=self.context,
instructions=self.instructions,
style=self.style,
adapt_to=self.adapt_to,
glossaries=self.glossaries,
reasoning=self.reasoning,
)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check if needed or already covered by new simplified serialization/deserialization defaults

@bogdankostic
Copy link
Copy Markdown
Contributor Author

Thanks for your feedback @anakin87! All of your comments should be addressed now

Copy link
Copy Markdown
Member

@anakin87 anakin87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@bogdankostic bogdankostic merged commit 0022248 into main Feb 24, 2026
12 checks passed
@bogdankostic bogdankostic deleted the lara-integration branch February 24, 2026 15:52
@davidsbatista
Copy link
Copy Markdown
Contributor

@anakin87 thanks for taking over this one 👍🏽

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

Labels

integration:lara topic:CI type:documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants