Provider (if applicable)
anthropic
Model (if applicable)
No response
Bug Description
The demo code found in the documentation to generate type-validated objects using NimbleOptions schemas results in the error "For 'integer' type, property 'minimum' is not supported":
{:error,
%ReqLLM.Error.API.Request{
reason: "Provider response error (400): Anthropic API error: output_format.schema: For 'integer' type, property 'minimum' is not supported",
status: 400,
response_body: %{
"error" => %{
"message" => "output_format.schema: For 'integer' type, property 'minimum' is not supported",
"type" => "invalid_request_error"
}...
Reproduction Code
schema = [
name: [type: :string, required: true],
age: [type: :pos_integer, required: true]
]
{:ok, response} = ReqLLM.generate_object("anthropic:claude-haiku-4-5", "Generate a person", schema)
object = ReqLLM.Response.object(response)
Expected Behavior
The schema should comply with Anthropic's specs by not using the property 'minimum'.
Actual Behavior
The schema uses the property 'minimum', which results in an error
Environment
- ReqLLM: 1.2.0
- Elixir: 1.19.4
- Erlang: 28.1.1
Provider (if applicable)
anthropic
Model (if applicable)
No response
Bug Description
The demo code found in the documentation to generate type-validated objects using NimbleOptions schemas results in the error
"For 'integer' type, property 'minimum' is not supported":Reproduction Code
Expected Behavior
The schema should comply with Anthropic's specs by not using the property 'minimum'.
Actual Behavior
The schema uses the property 'minimum', which results in an error
Environment