@vfarcic/dot-ai 1.15.1 → 1.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vercel-provider.d.ts","sourceRoot":"","sources":["../../../src/core/providers/vercel-provider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAaH,OAAO,EACL,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,aAAa,EACd,MAAM,0BAA0B,CAAC;AA4DlC,qBAAa,cAAe,YAAW,UAAU;IAC/C,OAAO,CAAC,YAAY,CAAoB;IACxC,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,OAAO,CAAC,aAAa,CAAC,CAAyB;IAC/C,OAAO,CAAC,aAAa,CAAiB;gBAE1B,MAAM,EAAE,gBAAgB;IAYpC,OAAO,CAAC,qBAAqB;IAiB7B,OAAO,CAAC,eAAe;
|
|
1
|
+
{"version":3,"file":"vercel-provider.d.ts","sourceRoot":"","sources":["../../../src/core/providers/vercel-provider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAaH,OAAO,EACL,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,aAAa,EACd,MAAM,0BAA0B,CAAC;AA4DlC,qBAAa,cAAe,YAAW,UAAU;IAC/C,OAAO,CAAC,YAAY,CAAoB;IACxC,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,OAAO,CAAC,aAAa,CAAC,CAAyB;IAC/C,OAAO,CAAC,aAAa,CAAiB;gBAE1B,MAAM,EAAE,gBAAgB;IAYpC,OAAO,CAAC,qBAAqB;IAiB7B,OAAO,CAAC,eAAe;IAyJvB,eAAe,IAAI,MAAM;IAIzB,eAAe,IAAI,MAAM;IAIzB,YAAY,IAAI,MAAM;IAItB,aAAa,IAAI,OAAO;IAIxB,OAAO,CAAC,iBAAiB;IAyBnB,WAAW,CACf,OAAO,EAAE,MAAM,EACf,SAAS,GAAE,MAAkB,EAC7B,iBAAiB,CAAC,EAAE;QAClB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,GACA,OAAO,CAAC,UAAU,CAAC;IAsJtB;;;;;;;;;;;;OAYG;IACG,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CA6b/D"}
|
|
@@ -83,18 +83,30 @@ class VercelProvider {
|
|
|
83
83
|
break;
|
|
84
84
|
case 'anthropic':
|
|
85
85
|
case 'anthropic_opus':
|
|
86
|
-
case 'anthropic_haiku':
|
|
86
|
+
case 'anthropic_haiku': {
|
|
87
|
+
// Detect Authorization header in custom headers (case-insensitive).
|
|
88
|
+
// Corporate proxies expect Authorization: Bearer auth, but apiKey sends x-api-key.
|
|
89
|
+
// When Authorization is present, extract the Bearer token and pass it as authToken
|
|
90
|
+
// so the SDK sends Authorization: Bearer instead of x-api-key.
|
|
91
|
+
const authHeaderKey = this.customHeaders
|
|
92
|
+
? Object.keys(this.customHeaders).find(key => key.toLowerCase() === 'authorization')
|
|
93
|
+
: undefined;
|
|
94
|
+
const authOpt = authHeaderKey
|
|
95
|
+
? {
|
|
96
|
+
authToken: this.customHeaders[authHeaderKey].replace(/^Bearer\s+/i, ''),
|
|
97
|
+
}
|
|
98
|
+
: { apiKey: this.apiKey };
|
|
99
|
+
// Strip Authorization from custom headers when using authToken (SDK generates it)
|
|
100
|
+
const filteredCustomHeaders = authHeaderKey && this.customHeaders
|
|
101
|
+
? Object.fromEntries(Object.entries(this.customHeaders).filter(([key]) => key.toLowerCase() !== 'authorization'))
|
|
102
|
+
: this.customHeaders;
|
|
87
103
|
provider = (0, anthropic_1.createAnthropic)({
|
|
88
|
-
|
|
104
|
+
...authOpt,
|
|
89
105
|
...baseURLOpt,
|
|
90
|
-
|
|
91
|
-
// Required for models like claude-sonnet-4-5-20250929
|
|
92
|
-
// PRD #443: Custom headers merge with (and can override) the anthropic-beta default
|
|
93
|
-
headers: mergeHeaders({
|
|
94
|
-
'anthropic-beta': 'context-1m-2025-08-07',
|
|
95
|
-
}),
|
|
106
|
+
...(filteredCustomHeaders && { headers: filteredCustomHeaders }),
|
|
96
107
|
});
|
|
97
108
|
break;
|
|
109
|
+
}
|
|
98
110
|
case 'xai':
|
|
99
111
|
provider = (0, xai_1.createXai)({
|
|
100
112
|
apiKey: this.apiKey,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vfarcic/dot-ai",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.2",
|
|
4
4
|
"description": "AI-powered development productivity platform that enhances software development workflows through intelligent automation and AI-driven assistance",
|
|
5
5
|
"mcpName": "io.github.vfarcic/dot-ai",
|
|
6
6
|
"main": "dist/index.js",
|