benepstein
10/24/2025, 8:33 PMUnspecified error code: 400 Request failed with status code: 400 Bad Request,
{
"error": {
"code": 400,
"message": "Invalid JSON payload received. Unknown name \"http\": Cannot find field.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"description": "Invalid JSON payload received. Unknown name \"http\": Cannot find field."
}
]
}
]
}
}
Request options: {"http":{"connect_timeout_ms":500,"time_to_first_token_timeout_ms":500,"idle_timeout_ms":500,"request_timeout_ms":2000},"generation_config":{"temperature":0.0,"seed":42}}
client looks like
client<llm> Gemini20FlashLite {
provider vertex-ai
options {
http {
connect_timeout_ms 500
time_to_first_token_timeout_ms 500
idle_timeout_ms 500
request_timeout_ms 2000
}
model gemini-2.0-flash-lite-001
project_id env.PROJECT_ID
location env.GEMINI_REGION
generation_config {
temperature 0.0
seed 42
}
}
}
am I being really dumb?Vaibhav (BAML ๐)
10/24/2025, 8:33 PMbenepstein
10/24/2025, 8:34 PMVaibhav (BAML ๐)
10/24/2025, 8:35 PMbenepstein
10/24/2025, 8:35 PMbenepstein
10/24/2025, 8:36 PMcurl -X POST 'https://us-central1-aiplatform.googleapis.com/v1/projects/{proj}/locations/us-central1/publishers/google/models/gemini-2.0-flash-lite-001:generateContent' -H "authorization: $REDACTED" -H "content-type: application/json" -d "{
\"generation_config\": {
\"temperature\": 0.0,
\"seed\": 42
},
\"http\": {
\"connect_timeout_ms\": 5000,
\"time_to_first_token_timeout_ms\": 5000,
\"idle_timeout_ms\": 5000,
\"request_timeout_ms\": 2000
},
\"contents\": [
{
\"role\": \"user\",
\"parts\": [
{
\"text\": \"{prompt}\"
}
]
}
]
}"Vaibhav (BAML ๐)
10/24/2025, 8:37 PMVaibhav (BAML ๐)
10/24/2025, 8:37 PMVaibhav (BAML ๐)
10/24/2025, 8:39 PMgoogle-ai works:
curl -X POST 'https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-lite-001:generateContent' -H "x-goog-api-key: $GOOGLE_API_KEY" -H "content-type: application/json" -d "{
\"location\": \"us-central1\",
\"generation_config\": {
\"temperature\": 0.0,
\"seed\": 42
},
\"contents\": [
{
\"role\": \"user\",
\"parts\": [
{
\"text\": \"Extract info from this receipt:\n\nAnswer in JSON using this schema:\n{\n establishment_name: string,\n // ISO8601 formatted date\n date: string,\n // The total amount of the receipt\n total: int,\n currency: string,\n // The items on the receipt\n items: [\n {\n name: string,\n price: float,\n // If not specified, assume 1\n quantity: int,\n }\n ],\n}\"
}
]
}
]
}"benepstein
10/24/2025, 8:39 PMVaibhav (BAML ๐)
10/24/2025, 8:40 PMbenepstein
10/24/2025, 8:41 PMbenepstein
10/24/2025, 8:41 PMbenepstein
10/24/2025, 8:41 PMbenepstein
10/24/2025, 8:42 PMgreg (BAML)
10/24/2025, 8:44 PMbenepstein
10/24/2025, 8:45 PMgreg (BAML)
10/24/2025, 8:46 PMbenepstein
10/27/2025, 9:47 PMbenepstein
10/30/2025, 1:43 PMVaibhav (BAML ๐)
10/30/2025, 2:35 PMVaibhav (BAML ๐)
10/30/2025, 7:25 PMVaibhav (BAML ๐)
10/30/2025, 8:02 PMVaibhav (BAML ๐)
10/30/2025, 8:02 PMVaibhav (BAML ๐)
10/30/2025, 8:53 PMVaibhav (BAML ๐)
10/30/2025, 8:54 PMVaibhav (BAML ๐)
10/30/2025, 9:01 PMbenepstein
10/31/2025, 4:32 PMbenepstein
10/31/2025, 4:35 PMVaibhav (BAML ๐)
10/31/2025, 4:44 PM