Repository navigation
Conversation
…btitleEdit#16373) The --settings file gets a tools.llamaCppAdvanced section with the 15 settings of the GUI's "Advanced..." dialog (batchSize, historyPairs, synopsis, glossary, formality, keepLineBreaks, prompt, the sampling values, contextSize, serverArguments, serverArgumentsOnly). Every key is optional; a command-line option wins over the file and the file over the dialog's defaults; profiles overlay the section like the others; the regular engines ignore it. Like exportImages, the section does not go through libse's Configuration: SeConvSettings.ApplyLlamaCppAdvanced overlays it onto a SeLlamaCppAdvanced carried by ConversionOptions.TranslateAdvancedSettings, and AutoTranslateRunner.CreateAdvancedSettings applies the options on top of that base. The merged result is validated once, so a bad value from either source fails before any conversion; ConvertCommand therefore builds the advanced settings after the file is loaded. dump-settings emits the section with the dialog's defaults. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The CLI reference and settings documentation incorrectly imply that -1 preserves server defaults instead of explaining the sampling, temperature, and token-limit fallbacks.
1 open issue
What changed in this PR
Completes the settings-file support requested in #16373 by exposing the advanced translation engines’ GUI settings to seconv, building on #16607 and #16814.
Changes:
- Adds 15 optional
tools.llamaCppAdvancedsettings, profile overlays, and default-settings output. - Applies command-line overrides before validating merged advanced settings.
- Adds focused tests and documents configuration and precedence.
| File | Description |
|---|---|
| tests/seconv/Core/SeConvSettingsTest.cs | Tests parsing, profile overlays, unknown keys, and formality validation. |
| tests/seconv/Core/SeConvSettingsDumpTest.cs | Checks advanced-settings defaults and emitted key count. |
| tests/seconv/Core/AutoTranslateRunnerTest.cs | Tests precedence, validation, and regular-engine isolation. |
| src/seconv/Core/SubtitleConverter.cs | Carries advanced settings in conversion options. |
| src/seconv/Core/SeConvSettings.cs | Defines, overlays, and dumps the new settings section. |
| src/seconv/Core/AutoTranslateRunner.cs | Merges file settings with command-line options and validates them. |
| src/seconv/Commands/ConvertCommand.cs | Loads file settings before advanced-settings validation. |
| docs/reference/command-line.md | Documents keys, defaults, precedence, and examples. |
| docs/features/auto-translate-advanced.md | Links advanced-engine usage to settings-file support. |
Review effort: Balanced
Updated the `exportImages` section to clarify the handling of optional keys and sampling values, and added details on key recognition for backward compatibility. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Makar8000
deleted the
claude/seconv-advanced-translate-settings-16373
branch
November 11, 2026 06:36
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.

Third and last PR for #16373, after #16607 and #16814: the issue's remaining item, "the same keys in the
--settingsJSON".Changes
tools.llamaCppAdvancedsection in the--settingsfile with the 15 settings of the GUI's "Advanced..." dialog:batchSize,historyPairs,synopsis,glossary,formality,keepLineBreaks,prompt,temperature,topP,topK,repeatPenalty,maxTokens,contextSize,serverArguments,serverArgumentsOnly. Every key is optional and a key left out keeps the dialog's default. The regular engines ignore the section, so one file serves both engine families.--translate-prompt>tools.llamaCppAdvanced.prompt> built-in).profilesoverlay the section like the other sections, so a profile can carry e.g. a per-film synopsis.exportImages, the other section that does not live in libse's Configuration:SeConvSettings.ApplyLlamaCppAdvancedoverlays the section (base, then profile) onto aSeLlamaCppAdvancedthat travels onConversionOptions.TranslateAdvancedSettings, andAutoTranslateRunner.CreateAdvancedSettingstakes it as the base and applies the options on top. The merged result is validated once (batch size and history ranges,{2}in the prompt), so a bad value from the file fails before any conversion with a message naming both sources, and a badformalityfails while the file is loaded.ConvertCommandtherefore builds the advanced settings after the file is loaded instead of before it.dump-settingsemits the section with the dialog's defaults, and unknown keys inside it are reported like the others (tools.llamaCppAdvanced.<key>).--settingsrow, the Settings JSON listing and prose, a paragraph with an example in the Advanced local engines section, and a mention on the advanced-engines feature page.Verification
dotnet test tests/seconv: 711 passed (9 new), 2 pre-existing skips. New: the section parses with a typo inside it reported, a profile overlays the base, a bad formality throws,dump-settingsemits all 15 keys (the existing round-trip test keeps every emitted key loadable), file values act as the base with the option winning, out-of-range and{2}values from the file are refused, and the regular engine ignores the section.dump-settingslisting in the docs is identical to the real output.contextSize: 8192andserverArguments: "--cache-reuse 256"plus a profile settingformality: informal, with--translate-batch-size:4on the command line. The server started with-c 8192 --cache-reuse 256, the 10 lines went out in batches of 4, the glossary term and the informal address are in the output, and the server stopped at exit. Validation of file values, checked with deliberately bad input:formality: "polite"is rejected while the file is loaded,batchSize: 60is rejected before any conversion starts unless--translate-batch-sizeoverrides it, and the regularllamacppengine ignores the section.🤖 Generated with Claude Code