Skip to content

[codex] Add OpenAI-compatible subtitle translation fallback#170

Draft
rasariogualco-crypto wants to merge 1 commit into
solidSpoon:mainfrom
rasariogualco-crypto:codex/openai-compatible-subtitle-fallback
Draft

[codex] Add OpenAI-compatible subtitle translation fallback#170
rasariogualco-crypto wants to merge 1 commit into
solidSpoon:mainfrom
rasariogualco-crypto:codex/openai-compatible-subtitle-fallback

Conversation

@rasariogualco-crypto

Copy link
Copy Markdown

Summary

  • Adds a plain chat-completions fallback when structured OpenAI subtitle translation streaming fails.
  • Parses JSON returned by OpenAI-compatible providers, including fenced JSON blocks.
  • Covers the parser and fallback path with focused Vitest tests.

Why

Some OpenAI-compatible providers, such as DeepSeek-style endpoints, can pass model connectivity tests but fail DashPlayer subtitle translation because structured streaming may not produce output. This keeps the existing structured path and falls back to a more compatible JSON text response.

Validation

  • ./node_modules/.bin/vitest run src/backend/application/services/impl/tests/openAiSubtitleBatchParser.test.ts src/backend/application/services/impl/tests/TranslateServiceImpl.openaiFallback.test.ts

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