Fixes
AsyncValenretries rate limits, overload and connection failures likeValen.remote, takesmax_retriesandheaders, and raisesValenAPIErrorwith the service's error detail.- A non-JSON response, such as a gateway's HTML 502, raises
ValenAPIErrorwith its status code, request ID and text. - A connection dropped mid-response (
ReadError,RemoteProtocolError) is retried like a connection failure and then raisesValenAPIErrorinstead of an httpx exception. - A self-hosted server's
{"error": {"message": ...}}becomes the error message, and the hosted APIs'x-llm-proxy-request-idfillsrequest_id.
Changes
- HTTP clients send
User-Agent: valen-sdk-python/<version>.
Install
Terminal
python -m pip install valen-sdk==0.3.1 # HTTP clients
python -m pip install "valen-sdk[onnx]==0.3.1" # local CPU inference