@vincemakes/kiso-provider-openai-responses 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 CHANGED
@@ -40,6 +40,11 @@ export interface OpenAIResponsesProviderConfig {
40
40
  readonly oauth?: () => Promise<ResponsesOAuthToken>;
41
41
  /** Overrides the target's default base URL (tests and proxies). */
42
42
  readonly baseUrl?: string;
43
+ /** Headers the endpoint needs on every request, as the profile names
44
+ * them. They go FIRST: the target's own headers (the credential, the
45
+ * backend's account and beta headers) are merged over them, so a
46
+ * configured header never replaces one this adapter must send. */
47
+ readonly headers?: Readonly<Record<string, string>>;
43
48
  /** The ChatGPT backend's prefix-cache key — the session id, so one
44
49
  * session's requests share a cache lane. Sent only to that target. */
45
50
  readonly promptCacheKey?: string;
package/dist/index.js CHANGED
@@ -66,6 +66,7 @@ function resolveTarget(config) {
66
66
  headers: async () => {
67
67
  const token = await oauth();
68
68
  return {
69
+ ...config.headers,
69
70
  authorization: `Bearer ${token.access}`,
70
71
  "chatgpt-account-id": token.accountId,
71
72
  originator: "kiso",
@@ -85,7 +86,7 @@ function resolveTarget(config) {
85
86
  return {
86
87
  providerId: "openai",
87
88
  url: firstPartyUrl(config.baseUrl ?? FIRST_PARTY_BASE),
88
- headers: async () => ({ authorization: `Bearer ${config.apiKey ?? ""}` }),
89
+ headers: async () => ({ ...config.headers, authorization: `Bearer ${config.apiKey ?? ""}` }),
89
90
  extraBody: {},
90
91
  };
91
92
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vincemakes/kiso-provider-openai-responses",
3
- "version": "0.40.2",
3
+ "version": "0.40.4",
4
4
  "description": "kiso OpenAI Responses adapter \u2014 the first-party Responses API and the ChatGPT subscription backend, one adapter, plain fetch + SSE.",
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.2"
24
+ "@vincemakes/kiso-core": "0.40.4"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/node": "^26.1.2",