Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/bump-openrouter-sdk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@openrouter/agent": patch
---

Bump @openrouter/sdk from 0.11.2 to 0.12.12, which adds `xhigh` and `max` to the `Verbosity` enum for `TextExtendedConfig`
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"prepare": "husky"
},
"dependencies": {
"@openrouter/sdk": "*",
"@openrouter/sdk": "^0.12.12",
"zod": "^4.0.0"
},
"devDependencies": {
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 21 additions & 7 deletions tests/unit/conversation-state.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,9 @@ describe('Conversation State Utilities', () => {

it('should stringify error outputs', () => {
const result = createRejectedResult('call-1', 'test_tool', 'Something went wrong');
const formatted = unsentResultsToAPIFormat([result]);
const formatted = unsentResultsToAPIFormat([
result,
]);

expect(formatted[0]?.output).toBe('{"error":"Something went wrong"}');
});
Expand All @@ -609,7 +611,9 @@ describe('Conversation State Utilities', () => {
text: 'Hello world',
},
];
const results = [createUnsentResult('call-1', 'test_tool', contentArray)];
const results = [
createUnsentResult('call-1', 'test_tool', contentArray),
];

const formatted = unsentResultsToAPIFormat(results);

Expand All @@ -625,7 +629,9 @@ describe('Conversation State Utilities', () => {
imageUrl: 'data:image/png;base64,abc123',
},
];
const results = [createUnsentResult('call-1', 'image_gen', contentArray)];
const results = [
createUnsentResult('call-1', 'image_gen', contentArray),
];

const formatted = unsentResultsToAPIFormat(results);

Expand All @@ -645,7 +651,9 @@ describe('Conversation State Utilities', () => {
imageUrl: 'data:image/png;base64,abc123',
},
];
const results = [createUnsentResult('call-1', 'image_gen', contentArray)];
const results = [
createUnsentResult('call-1', 'image_gen', contentArray),
];

const formatted = unsentResultsToAPIFormat(results);

Expand All @@ -657,15 +665,19 @@ describe('Conversation State Utilities', () => {
'item1',
'item2',
];
const results = [createUnsentResult('call-1', 'test_tool', regularArray)];
const results = [
createUnsentResult('call-1', 'test_tool', regularArray),
];

const formatted = unsentResultsToAPIFormat(results);

expect(formatted[0]?.output).toBe('["item1","item2"]');
});

it('should stringify empty arrays', () => {
const results = [createUnsentResult('call-1', 'test_tool', [])];
const results = [
createUnsentResult('call-1', 'test_tool', []),
];

const formatted = unsentResultsToAPIFormat(results);

Expand All @@ -679,7 +691,9 @@ describe('Conversation State Utilities', () => {
data: 'test',
},
];
const results = [createUnsentResult('call-1', 'test_tool', invalidArray)];
const results = [
createUnsentResult('call-1', 'test_tool', invalidArray),
];

const formatted = unsentResultsToAPIFormat(results);

Expand Down
Loading