Skip to content

Commit 6121900

Browse files
authored
fix: use actual tool description instead of type (#146)
1 parent 099bd59 commit 6121900

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/chat/index.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,7 @@ describe('doGenerate', () => {
438438
{
439439
type: 'function',
440440
name: 'test-tool',
441+
description: 'Test tool',
441442
inputSchema: {
442443
type: 'object',
443444
properties: { value: { type: 'string' } },
@@ -461,7 +462,7 @@ describe('doGenerate', () => {
461462
type: 'function',
462463
function: {
463464
name: 'test-tool',
464-
description: 'function',
465+
description: 'Test tool',
465466
parameters: {
466467
type: 'object',
467468
properties: { value: { type: 'string' } },

src/chat/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export class OpenRouterChatLanguageModel implements LanguageModelV2 {
167167
type: 'function' as const,
168168
function: {
169169
name: tool.name,
170-
description: tool.type,
170+
description: tool.description,
171171
parameters: tool.inputSchema,
172172
},
173173
}));

0 commit comments

Comments
 (0)