forked from boos/BoosAPI
fix: update test assertions to access parsed claudeOriginalBody structure
This commit is contained in:
@@ -586,7 +586,7 @@ describe('convertOpenAiBodyToAnthropicMessagesBody', () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
expect(result.error).toBeUndefined();
|
expect(result.error).toBeUndefined();
|
||||||
expect(result.value?.claudeOriginalBody).toEqual({
|
expect(result.value?.parsed.claudeOriginalBody).toEqual({
|
||||||
model: 'gpt-5',
|
model: 'gpt-5',
|
||||||
max_tokens: 512,
|
max_tokens: 512,
|
||||||
tools: [
|
tools: [
|
||||||
@@ -623,7 +623,7 @@ describe('convertOpenAiToolChoiceToAnthropic', () => {
|
|||||||
max_tokens: 512,
|
max_tokens: 512,
|
||||||
messages: [{ role: 'user', content: 'hello' }],
|
messages: [{ role: 'user', content: 'hello' }],
|
||||||
tool_choice: { type: 'tool', tool: { name: 'lookup' } },
|
tool_choice: { type: 'tool', tool: { name: 'lookup' } },
|
||||||
}).value?.claudeOriginalBody?.tool_choice).toEqual({
|
}).value?.parsed.claudeOriginalBody?.tool_choice).toEqual({
|
||||||
type: 'tool',
|
type: 'tool',
|
||||||
name: 'lookup',
|
name: 'lookup',
|
||||||
});
|
});
|
||||||
@@ -633,7 +633,7 @@ describe('convertOpenAiToolChoiceToAnthropic', () => {
|
|||||||
max_tokens: 512,
|
max_tokens: 512,
|
||||||
messages: [{ role: 'user', content: 'hello' }],
|
messages: [{ role: 'user', content: 'hello' }],
|
||||||
tool_choice: { type: 'none', name: 'should-disappear' },
|
tool_choice: { type: 'none', name: 'should-disappear' },
|
||||||
}).value?.claudeOriginalBody?.tool_choice).toEqual({
|
}).value?.parsed.claudeOriginalBody?.tool_choice).toEqual({
|
||||||
type: 'none',
|
type: 'none',
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user