Skip to content

Wire API-Route prompt into translate settings - #101

Draft
Blackspirits wants to merge 1 commit into
upl/review-base-api-route-d47dfrom
fix/api-route-prompt-settings-d47d
Draft

Wire API-Route prompt into translate settings#101
Blackspirits wants to merge 1 commit into
upl/review-base-api-route-d47dfrom
fix/api-route-prompt-settings-d47d

Conversation

@Blackspirits

@Blackspirits Blackspirits commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Summary

Upstream PR SubtitleEdit#14836 adds ApiRoutePrompt to both runtime and persisted auto-translate settings, but does not register ApiRouteTranslate in TranslateSettingsViewModel.

As a result, the per-engine Translate settings dialog treats API-Route as an engine without a configurable prompt:

  • the prompt editor is hidden because GetPrompt returns null;
  • Reset prompt cannot restore the API-Route default;
  • SaveValues never writes an edited API-Route prompt;
  • the normal {0} / {1} source/target placeholder validation is skipped.

This change mirrors the existing OpenRouter/Groq/etc. wiring:

  • include API-Route in prompt validation;
  • persist ApiRoutePrompt to both Se.Settings and Configuration.Settings.Tools;
  • return the API-Route prompt from GetPrompt.

Validation

  • based exactly on upstream PR feat(translate): add API-Route auto-translator SubtitleEdit/subtitleedit#14836 HEAD d47d366133e62a876b72c598289a537b41170235
  • one UI view-model file only
  • no API transport/model behavior changed
  • full solution restore passed
  • full solution build passed
  • full solution test suite passed on the first run
  • UI suite: 5,149 passed, 9 skipped, 0 failed (5,158 total)
  • retry step was not used
  • validation run: #34780482268

Note: API-Route's current documentation says supported models change over time and the Pricing page is the source of truth. SubtitleEdit#14836's static model suggestions are therefore maintenance debt, but Model is a free-text field, so that is not part of this functional prompt fix.

AI assistance: ChatGPT was used to adversarially review the new API-Route auto-translator's settings/persistence integration.

@Blackspirits Blackspirits left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Independent adversarial re-check: upstream SubtitleEdit#14836 adds ApiRoutePrompt to runtime/persisted settings but omits ApiRouteTranslate from TranslateSettingsViewModel's prompt contract. Without this patch the prompt editor is hidden, reset/save do not handle ApiRoutePrompt, and {0}/{1} placeholder validation is skipped. The final diff mirrors existing OpenRouter/Groq wiring in exactly those three places and changes no API transport/model behavior. Full CI #34780482268 passed restore, build and the complete suite on the first run; UITests reported 5,149 passed, 9 skipped, 0 failed. Retry was not used. No blocker identified in the fix. Keep draft; no merge performed.

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.

1 participant