


@cf/meta/llama-3.1-8b-instruct-fast. I'm seeing a lot of Error: oneOf at '.' not met: required properties at '.name' is 'type,description', required properties at '.tools.0.function.parameters' is 'type,properties' errors in my AI Gateway logs. I'm comparing to requests that I sent last friday -- the request schema I'm using is the same, but something is causing it to error out { message: 'AiError: AiError: Capacity temporarily exceeded, please try again.', code: 3040 }description key{ message: 'AiError: AiError: Capacity temporarily exceeded, please try again.', code: 3040 }@cf/black-forest-labs/flux-1-schnell is not available as a BaseAiTextToImageModels)schnell, p90 latency should be ~500 ms, not secondsDeepseek-R1? When I tried it,the model simply returns a normal response as if tools where not specified. I used the schema that works Hermes and LLama, and I have also tried the schema shown here: https://api-docs.deepseek.com/guides/function_calling. But neither work.const response = await env.AI.run("@hf/nousresearch/hermes-2-pro-mistral-7b", {
messages: [
{
role: "user",
content: "what is the weather in london?",
},
],
tools: [
{
name: "getWeather",
description: "Return the weather for a latitude and longitude",
parameters: {
type: "object",
properties: {
latitude: {
type: "string",
description: "The latitude for the given location",
},
longitude: {
type: "string",
description: "The longitude for the given location",
},
},
required: ["latitude", "longitude"],
},
},
],
});
return new Response(JSON.stringify(response.tool_calls));{
"id": "id-1739396566250",
"object": "chat.completion",
"created": 1739396566,
"model": "@hf/nousresearch/hermes-2-pro-mistral-7b",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": null
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"input": 15,
"output": 0,
"total": 15
}
}Error: oneOf at '.' not met: required properties at '.name' is 'type,description', required properties at '.tools.0.function.parameters' is 'type,properties'{
"prompt": "Find the computer specs",
"temperature": 0,
"messages": [
{
"role": "user",
"content": "..."
}
],
"tools": [
{
"name": "dataExtractor",
"description": "Extract data that conforms to the provided schema",
"parameters": {
"type": "object",
"properties": {
"model": {
"type": "string"
},
"cpu": {
"type": "string"
},
"ram": {
"type": "string"
},
"hard_drive": {
"type": "string"
},
"year": {
"type": "integer"
},
"screen_size": {
"type": "string"
},
"dollars": {
"type": "integer"
},
"location": {
"type": "string"
},
"condition": {
"type": "string",
"enum": [
"new",
"like new",
"excellent",
"good",
"fair",
"salvage"
]
}
},
"required": [
"model",
"cpu",
"ram",
"hard_drive",
"year",
"screen_size",
"dollars",
"location",
"condition"
],
"additionalProperties": false
}
}
]
}"properties": {
"model": {
"type": "string"
},
..."properties": {
"model": {
"type": "string",
"description": "name of the model to be used" //or whatever the appropriate description is
},
...