diff --git a/.gitignore b/.gitignore index fede83b..de7a47b 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,8 @@ dist/ # But keep these specific files !.eslintrc.js +!jest.config.js + # IDE .vscode/ @@ -44,3 +46,4 @@ temp/ # MCP servers .playwright-mcp/ + diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..0c4001f --- /dev/null +++ b/jest.config.js @@ -0,0 +1,5 @@ +module.exports = { + preset: 'ts-jest', + testEnvironment: 'node', + testMatch: ['**/tests/**/*.test.ts'], +}; \ No newline at end of file diff --git a/nodes/LmChatOpenCode/OpenCodeChatModel.ts b/nodes/LmChatOpenCode/OpenCodeChatModel.ts index 68bafb8..d6529bd 100644 --- a/nodes/LmChatOpenCode/OpenCodeChatModel.ts +++ b/nodes/LmChatOpenCode/OpenCodeChatModel.ts @@ -159,7 +159,7 @@ export class OpenCodeChatModel extends BaseChatModel { agent: this.agent, model: { providerID: this.providerID, - modelID: this.modelID, + id: this.modelID, }, }), signal: controller.signal, @@ -247,10 +247,6 @@ export class OpenCodeChatModel extends BaseChatModel { // Build request body with optional parameters const body: Record = { parts, - model: { - providerID: this.providerID, - modelID: this.modelID, - }, agent: this.agent, }; diff --git a/tests/OpenCodeChatModel.test.ts b/tests/OpenCodeChatModel.test.ts index acbde7a..43f19e9 100644 --- a/tests/OpenCodeChatModel.test.ts +++ b/tests/OpenCodeChatModel.test.ts @@ -108,7 +108,7 @@ describe("OpenCodeChatModel", () => { agent: "build", model: { providerID: "anthropic", - modelID: "claude-3-5-sonnet-20241022", + id: "claude-3-5-sonnet-20241022", }, }), }),