fix: preserve native model parameters and align official Claude reasoning
This commit is contained in:
@@ -19,7 +19,7 @@ function wireBody(config, messages, tools) {
|
||||
});
|
||||
if (protocol === 'anthropic-messages') return messagesBody(config, messages, tools, native);
|
||||
if (protocol === 'chat-completions') return { model: config.model, messages: cleanMessages, tools, tool_choice: 'auto', ...(!isPassthrough(config) ? { [native.outputTokenField]: config.maxOutputTokens } : {}), stream, ...native.nativeParameters,
|
||||
...(stream ? { stream_options: { include_usage: true } } : {}) };
|
||||
...(stream && !Object.hasOwn(native.nativeParameters, 'stream_options') ? { stream_options: { include_usage: true } } : {}) };
|
||||
const input = messages.flatMap(message => {
|
||||
if (message.role === 'tool') return [{ type: 'function_call_output', call_id: message.tool_call_id, output: message.content }];
|
||||
if (message.role === 'assistant') {
|
||||
|
||||
Reference in New Issue
Block a user