@vincemakes/kiso-provider-openai 0.40.2 → 0.40.4
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.
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -20,6 +20,10 @@ import type { Adapter } from "@vincemakes/kiso-core";
|
|
|
20
20
|
export interface OpenAICompatProviderConfig {
|
|
21
21
|
readonly apiKey?: string;
|
|
22
22
|
readonly baseUrl?: string;
|
|
23
|
+
/** Headers the endpoint needs on every request, as the profile names
|
|
24
|
+
* them (a gateway's session header, say). Sent as the SDK's default
|
|
25
|
+
* headers; the credential stays in `apiKey`, never here. */
|
|
26
|
+
readonly headers?: Readonly<Record<string, string>>;
|
|
23
27
|
/** MG-1 (A5): the adapter's replay identity — providerId as the runtime
|
|
24
28
|
* resolved it (deepseek / zai / openai / custom). Absent = "custom"
|
|
25
29
|
* with the baseUrl origin as the endpoint term. */
|
package/dist/index.js
CHANGED
|
@@ -28,6 +28,7 @@ export function createOpenAICompatProvider(config = {}) {
|
|
|
28
28
|
const client = new OpenAI({
|
|
29
29
|
...(config.apiKey !== undefined ? { apiKey: config.apiKey } : {}),
|
|
30
30
|
...(config.baseUrl !== undefined ? { baseURL: config.baseUrl } : {}),
|
|
31
|
+
...(config.headers !== undefined ? { defaultHeaders: { ...config.headers } } : {}),
|
|
31
32
|
// CX-1 F8: ONE retry authority — the kernel. The SDK's implicit two
|
|
32
33
|
// retries used to run beneath the kernel's budget (maxRetries = 0
|
|
33
34
|
// still made three requests) and beneath the request trace.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vincemakes/kiso-provider-openai",
|
|
3
|
-
"version": "0.40.
|
|
3
|
+
"version": "0.40.4",
|
|
4
4
|
"description": "kiso OpenAI-compatible adapter \u2014 OpenAI + the compat family (GLM, Kimi, DeepSeek, OpenRouter) via base_url swap, reasoning dialects digested.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"test": "vitest run"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@vincemakes/kiso-core": "0.40.
|
|
24
|
+
"@vincemakes/kiso-core": "0.40.4",
|
|
25
25
|
"openai": "^7.3.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|