Closed
Description
Description
To reproduce:
const model = createMistral({
apiKey: "KEY",
})("ministral-8b-latest");
const ret = await streamObject({
model,
mode: "tool",
// output: "object" as const,
prompt: "return hello world",
schema: jsonSchema({
type: "object",
required: ["text"],
properties: {
text: {
type: "string",
},
},
}),
onError(error) {
console.log(error);
},
});
results in
{"detail":[{"type":"extra_forbidden","loc":["body","tools","list[Tool]",0,"function","type"],"msg":"Extra inputs are not permitted","input":"function"},{"type":"string_type","loc":["body","tools","list[str]",0],"msg":"Input should be a valid string","input":{"type":"function","function":{"type":"function","name":"json","description":"Respond with a JSON object.","parameters":{"type":"object","required":["text"],"properties":{"text":{"type":"string"}}}}}}]}
AI SDK Version
"ai": "^4.3.15",
"@ai-sdk/mistral": "^1.2.8",