fix(translate): Kilo API response_format, reasoning_effort skip, structured_outputs fallback, refusal handling
- Enable response_format (json_object) for all providers including Kilo/OpenRouter - Skip reasoning_effort for Kilo/OpenRouter (returns 400 — mandatory reasoning) - Add structured_outputs fallback: retry once without response_format if upstream provider (e.g. StepFun) rejects it with 'structured_outputs is not supported' - Handle model refusal field (refusal) instead of treating as empty content - Fix None-handling guards for message/finish_reason/content fields - Apply same fixes to both preview.py and executor.py _call_openai_compatible - Connect orphaned TermCorrectionPopup, BulkReplaceModal, BulkCorrectionSidebar
This commit is contained in:
@@ -16,6 +16,7 @@ server {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_read_timeout 300s;
|
||||
}
|
||||
|
||||
location /ws/ {
|
||||
@@ -27,5 +28,6 @@ server {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_read_timeout 300s;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user