Skip to content

feat: add Lara Think reasoning levels - #82

Merged
Starllordz merged 6 commits into
mainfrom
feature/lara-think-reasoning
Nov 6, 2026
Merged

Starllordz merged 6 commits into
mainfrom
feature/lara-think-reasoning

Conversation

@Starllordz

@Starllordz Starllordz commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Adds Lara Think selection and low/medium/high reasoning levels across text, file and project translations. Use --reasoning and --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.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Copilot AI balanced review requested due to automatic review settings November 5, 2026 11:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 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.
@Starllordz
Starllordz requested a review from Khalester November 6, 2026 11:22
@Starllordz
Starllordz merged commit e4073c0 into main Nov 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants