-
Notifications
You must be signed in to change notification settings - Fork 160
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Enabled logging (by the way: issue 73) and saw this in stdout:
<6> okhttp3.OkHttpClient <-- 400 https://generativelanguage.googleapis.com/v1beta/openai/chat/completions (40ms)
...
<6> okhttp3.OkHttpClient [{
"error": {
"code": 400,
"message": "Invalid JSON payload received. Unknown name \"seed\": Cannot find field.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"description": "Invalid JSON payload received. Unknown name \"seed\": Cannot find field."
}
]
}
]
}
}
]
<6> okhttp3.OkHttpClient <-- END HTTP (431-byte, 243-gzipped-byte body)
well, errors happen, and the details are clear enough.
But in my code - in the com.openai.errors.BadRequestException I see ONLY THIS:

EXPECTED RESULT: BadRequestException should contain "Invalid JSON payload received. Unknown name "seed": Cannot find field.",
probably together with "type.googleapis.com/google.rpc.BadRequest"
This is NOT a minor issue - I should immediately see why the error happens, the "400" does not really help!
Details
<dependency>
<groupId>com.openai</groupId>
<artifactId>openai-java</artifactId>
<version>3.4.1</version>
</dependency>
And I am calling this server: https://generativelanguage.googleapis.com/v1beta/openai
Model: gemma-3-12b-it
Here the "OpenAI compatibility" documentation: https://ai.google.dev/gemini-api/docs/openai
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working