Skip to content

Commit 3bd6834

Browse files
committed
feat: 2.0.3 headers
1 parent 8226cf2 commit 3bd6834

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

__tests__/file-edit-openrouter-multiple.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ describe('File Edit Tool with OpenRouter - Multiple Files', () => {
5151
provider: AI_PROVIDERS.OPENROUTER,
5252
customModel: 'openai/gpt-4.1',
5353
apiKey: process.env.OPENROUTER_API_KEY || '',
54+
headers: {
55+
'HTTP-Referer': 'https://eval.16x.engineer/',
56+
'X-Title': '16x Eval',
57+
},
5458
},
5559
[
5660
path.join(testDir, '1', 'file1.js'),

index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,16 @@ export type FirstPartyConfig = {
104104
provider: SUPPORTED_FIRST_PARTYPROVIDERS;
105105
model: ModelEnum;
106106
apiKey: string;
107+
} & {
108+
headers?: Record<string, string>;
107109
};
108110

109111
export type ThirdPartyConfig = {
110112
provider: SUPPORTED_THIRD_PARTY_PROVIDERS;
111113
customModel: string;
112114
apiKey: string;
115+
} & {
116+
headers?: Record<string, string>;
113117
};
114118

115119
export type ModelProviderConfig = FirstPartyConfig | ThirdPartyConfig;

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ai-file-edit",
3-
"version": "2.0.2",
3+
"version": "2.0.3",
44
"main": "dist/index.js",
55
"types": "dist/index.d.ts",
66
"type": "module",
@@ -44,7 +44,7 @@
4444
"diff": "^7.0.0",
4545
"llm-info": "^1.0.44",
4646
"openai": "^4.97.0",
47-
"send-prompt": "^2.0.0"
47+
"send-prompt": "^2.0.1"
4848
},
4949
"devDependencies": {
5050
"@types/diff": "^7.0.2",

0 commit comments

Comments
 (0)