Repository navigation
feat: add Lara Think reasoning levels - #82
Merged
Merged
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the Lara Think configuration and translation-flow changes.
No open issues 🎉
1 file not reviewed
pnpm-lock.yaml: Generated file
What changed in this PR
Adds Lara Think reasoning levels to the CLI’s text, file, and project translation flows, with configurable effort and explicit flag precedence.
Changes:
- Adds Think selection and low/medium/high effort settings, defaulting to high when enabled.
- Propagates reasoning options through translation paths, uses a 300-second Think timeout, and reports server fallback through warnings and metrics.
- Updates the Lara SDK, documents usage, and adds configuration, integration, and HTTP-level tests.
| File | Description |
|---|---|
src/modules/translation/translation.service.ts |
Applies reasoning defaults, Think timeout, fallback warnings, and metrics. |
src/modules/translation/translation.engine.ts |
Passes reasoning settings into translation requests. |
src/modules/metrics/metrics.ts |
Adds reasoning and fallback context fields. |
src/modules/config/config.types.ts |
Accepts project reasoning settings. |
src/cli/cmd/translate/translate.ts |
Adds CLI flags and resolves configuration precedence. |
src/cli/cmd/init/init.ts |
Initializes projects with reasoning disabled. |
src/__tests__/utils/config-think.test.ts |
Tests compatible configuration parsing and effort validation. |
src/__tests__/translation/think.http.test.ts |
Tests SDK payloads, timeout settings, retries, and fallback. |
src/__tests__/integration/direct-translate.integration.test.ts |
Tests reasoning flags across translation modes and project overrides. |
README.md |
Documents Think usage, precedence, timeouts, and fallback behavior. |
pnpm-lock.yaml |
Locks the updated Lara SDK version. |
package.json |
Updates the Lara SDK dependency to ^1.18.2. |
Review effort: Balanced
Upgrade glob to fix traversal after cancellation and override vulnerable\nminimatch versions used by development tooling to prevent pattern-driven\nresource exhaustion.
Khalester
approved these changes
Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Lara Think selection and low/medium/high reasoning levels across text, file and project translations. Use
--reasoningand--reasoning-effort, or project configuration; explicit flags take precedence and Think defaults to high.Preserves reasoning settings through batches, retries and per-item fallback. Think requests allow 300 seconds while Base retains 30 seconds. Server-reported reasoning fallback keeps the translation and warns on stderr. Includes usage metrics and user documentation.
Validation: build passed; 1000 tests passed, including real-SDK HTTP payload, timeout, retry, fallback and configuration-precedence tests. No live Lara API calls were made.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.