-
Notifications
You must be signed in to change notification settings - Fork 280
Foundry local doesn't support array for "type" property in tools #576
Copy link
Copy link
Open
Description
Per OpenAI spec, a function property type can be an array of different types but this causes a 500 error in Foundry Local.
https://developers.openai.com/api/docs/guides/function-calling#strict-mode
See the following request for example. This currently blocks us from being able to use Foundry Local models in Visual Studio chat BYOK support.
{
"top_p": 1,
"messages": [
{
"role": "system",
"content": "You are an AI programming assistant."
},
{
"role": "user",
"content": "..."
}
],
"max_completion_tokens": 4096,
"stream": true,
"tools": [
{
"type": "function",
"function": {
"description": "..",
"name": "grep_search",
"parameters": {
"type": "object",
"required": [
"includePattern"
],
"properties": {
"includePattern": {
"type": [
"string",
"null"
],
"description": "..."
}
},
"additionalProperties": false
}
}
}
],
"tool_choice": "auto",
"model": "qwen2.5-coder-7b-instruct-generic-cpu:4"
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels