fix(ai): support Terra completion token limits (#44)

This commit is contained in:
2026-11-25 09:51:55 +01:00
parent a52268cf71
commit 3983e49ff8
6 changed files with 101 additions and 3 deletions

View File

@ -78,7 +78,7 @@ func TestTicket43HTTPGenerationAdaptersUseExactModelCredentialsAndSmallOutput(t
response := ""
switch name {
case "openai":
if body["model"] != "exact-saved-model" || body["max_tokens"] != float64(modelTestMaxOutputTokens) || r.Header.Get("Authorization") != "Bearer "+key {
if body["model"] != "exact-saved-model" || body["max_completion_tokens"] != float64(modelTestMaxOutputTokens) || r.Header.Get("Authorization") != "Bearer "+key {
t.Error("OpenAI generation configuration changed")
}
response = `{"choices":[{"message":{"role":"assistant","content":"OK"}}]}`