https://www.boundaryml.com logo
🟡 Request Timeout and Bad Request Errors with Cla...
# questions
i
Hello Baml team, I have been working on a project using Claude Anthropic deployed through Microsoft's Foundry to extract structure from mol bio experiment notes. I have been running into this issue quite frequently: ---REQUEST OPTIONS--- model: "claude-sonnet-4-5" max_tokens: 63000 ---ERROR (Unspecified error code: 408)--- Request failed with status code: 408 Request Timeout. {"error":{"code":"Timeout","message":"The operation was timeout."}} Error: BamlClientHttpError(client_name=Claude_Sonnet_4_5, message=Request failed with status code: 408 Request Timeout. {"error":{"code":"Timeout","message":"The operation was timeout."}}, status_code=408, detailed_message=LLM client "Claude_Sonnet_4_5" failed with status code: Unspecified error code: 408 Message: Request failed with status code: 408 Request Timeout. {"error":{"code":"Timeout","message":"The operation was timeout."}}) I have attempted adding in a timeout configuration of 5 mins as per the documentation, but I am currently facing a different error that's blocking the request entirely, any help on how I can get consitent responses without timeouts would be really appreciated: ---REQUEST OPTIONS--- model: "claude-sonnet-4-5" max_tokens: 63000 http: {"connect_timeout_ms":10000,"time_to_first_token_timeout_ms":30000,"idle_timeout_ms":2000,"request_timeout_ms":300000} ---ERROR (Unspecified error code: 400)--- Request failed with status code: 400 Bad Request. {"type":"error","error":{"type":"invalid_request_error","message":"http: Extra inputs are not permitted"},"request_id":"req_011CVtnYpg8i6tpqptgCYhvP"}
Here is my client configuration: client Claude_Sonnet_4_5 { provider anthropic options { base_url env.AZURE_ANTHROPIC_API_ENDPOINT model "claude-sonnet-4-5" api_key env.AZURE_ANTHROPIC_API_KEY max_tokens 63000 http { connect_timeout_ms 10000 // 10s to connect time_to_first_token_timeout_ms 30000 // 30s to first token idle_timeout_ms 2000 // 2s between chunks request_timeout_ms 300000 // 5 minutes total } } }
b
Our vscode extension has a "raw curl" that allows inspecting the exact HTTP request that BAML issues
I would start there to figure out what's going on: the error response suggests some field that either BAML or your code is setting is getting rejected by the Foundry API