fix: MIDI rearrange tool spec double-wrapped, AI returns _unknown
REARRANGE_TOOL_SPEC already has {type:'function', function:{...}}
wrapper. callLLM's tools.map(t => ({type:'function', function:t}))
added ANOTHER wrapper, creating nested:
{type:'function', function:{type:'function', function:{name}}}
which AI models couldn't parse -> function name became _unknown.
Fix: pass .function (inner spec) instead of the outer wrapper.
This commit is contained in:
@@ -13941,7 +13941,7 @@ const App = () => {
|
||||
apiKey,
|
||||
baseUrl: baseUrl.replace(/\/chat\/completions$/, '').replace(/\/$/, ''),
|
||||
messages,
|
||||
tools: [window.AIGateway.REARRANGE_TOOL_SPEC],
|
||||
tools: [window.AIGateway.REARRANGE_TOOL_SPEC.function],
|
||||
toolChoice: 'auto'
|
||||
});
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user