-
Type:
Bug
-
Resolution: Unresolved
-
None
-
Affects Version/s: None
-
Component/s: translate5 AI
-
Medium
-
None
-
Update moder models matching logic for old not supported API parameters.
-
None
-
Emptyshow more show less
Problem
translate5 decides how to talk to an OpenAI model by looking at the model name. Newer models (o-series and GPT-5) need the request parameter "max_completion_tokens" instead of the older "max_tokens", and translate5 already sends the correct parameter for them. The model names are recognized with a fixed list of name patterns. This list does not know model generations newer than GPT-5 (for example "gpt-6.1").
Because of this, a newer model is treated like an old one:
- AI pre-translation and TQE send "max_tokens". The model rejects the request with "Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead." and the segments of the affected batch are not processed.
- For OpenAI (not Azure), newer models are not offered in the model selection of the language resource, because the model list only accepts GPT-3, GPT-4 and GPT-5 names.
This happens only with model generations newer than GPT-5. Existing GPT-4 and GPT-5 resources are not affected. Single segment requests (for example in the editor) are not affected, because no token limit is sent there.
As a workaround, a reasoning effort ("low", "medium" or "high") can be set in the model properties of the language resource. translate5 then sends "max_completion_tokens".
Solution
- Update the model name pattern matching so that all GPT generations from GPT-5 on (gpt-5, gpt-6, gpt-7 and later) are recognized as reasoning models with the GPT-5 capabilities. They then get "max_completion_tokens" and the reasoning effort options.
- Update the model list filter for OpenAI so that newer GPT generations and o-series models are offered in the model selection.
- Specific capability entries for older models stay unchanged. Unknown model names keep the current fallback behaviour.