@yolk-sdk/agent 0.1.0-canary.61 → 0.1.0-canary.63
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/README.md +4 -1
- package/dist/providers/xai/grok-provider.d.mts +7 -1
- package/dist/providers/xai/grok-provider.d.mts.map +1 -1
- package/dist/providers/xai/grok-provider.mjs +4 -1
- package/dist/providers/xai/grok-provider.mjs.map +1 -1
- package/dist/skillset/merge.d.mts +1 -1
- package/dist/skillset/name.d.mts +2 -2
- package/dist/skillset/name.d.mts.map +1 -1
- package/package.json +1 -1
- package/src/providers/xai/grok-provider.ts +10 -1
package/README.md
CHANGED
|
@@ -177,7 +177,10 @@ Required authorization and JSON headers cannot be replaced through `extraHeaders
|
|
|
177
177
|
|
|
178
178
|
Grok subscription access uses `https://cli-chat-proxy.grok.com/v1/responses`, not the xAI developer
|
|
179
179
|
API-key endpoint. The adapter sends the required CLI-session and model-routing headers and rejects
|
|
180
|
-
mismatched or expired access-token envelopes before HTTP.
|
|
180
|
+
mismatched or expired access-token envelopes before HTTP. `makeXAiGrokProviderLayer` also requires
|
|
181
|
+
a truthful host-owned `clientVersion`, sent as `x-grok-client-version`, because the xAI CLI proxy
|
|
182
|
+
version-gates requests and rejects missing or outdated versions with HTTP 426; required headers
|
|
183
|
+
stay non-overridable through `extraHeaders`. The package exports browser-PKCE and
|
|
181
184
|
device-flow constants; hosts own the callback listener or device polling, token exchange/refresh,
|
|
182
185
|
secure storage, and model discovery. Only set `responsesUrl` to a trusted proxy because it receives
|
|
183
186
|
the OAuth bearer. xAI controls the public CLI OAuth client and private, unsupported proxy contract,
|
|
@@ -8,7 +8,13 @@ import { OAuthAccessToken } from "@yolk-sdk/agent/oauth";
|
|
|
8
8
|
type XAiGrokReasoningSummary = 'auto' | 'concise' | 'detailed';
|
|
9
9
|
type XAiGrokProviderConfig = {
|
|
10
10
|
readonly token: OAuthAccessToken;
|
|
11
|
-
readonly maxOutputTokens: number;
|
|
11
|
+
readonly maxOutputTokens: number;
|
|
12
|
+
/**
|
|
13
|
+
* Grok CLI client version sent as `x-grok-client-version`. The xAI CLI proxy version-gates
|
|
14
|
+
* requests and rejects missing or outdated versions with HTTP 426. The host owns this value and
|
|
15
|
+
* must use the proxy only as permitted by xAI's terms.
|
|
16
|
+
*/
|
|
17
|
+
readonly clientVersion: string; /** Override only with a trusted proxy because the OAuth bearer is sent to this URL. */
|
|
12
18
|
readonly responsesUrl?: string;
|
|
13
19
|
readonly extraHeaders?: Readonly<Record<string, string>>;
|
|
14
20
|
readonly defaultReasoningEffort?: AgentReasoningEffort;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grok-provider.d.mts","names":[],"sources":["../../../src/providers/xai/grok-provider.ts"],"mappings":";;;;;;;KAaY,uBAAA;AAAA,KAEA,qBAAA;EAAA,SACD,KAAA,EAAO,gBAAA;EAAA,SACP,eAAA;
|
|
1
|
+
{"version":3,"file":"grok-provider.d.mts","names":[],"sources":["../../../src/providers/xai/grok-provider.ts"],"mappings":";;;;;;;KAaY,uBAAA;AAAA,KAEA,qBAAA;EAAA,SACD,KAAA,EAAO,gBAAA;EAAA,SACP,eAAA;;;AAJwB;AAEnC;;WAQW,aAAA,UAPO;EAAA,SASP,YAAA;EAAA,SACA,YAAA,GAAe,QAAA,CAAS,MAAA;EAAA,SACxB,sBAAA,GAAyB,oBAAA;EAAA,SACzB,gBAAA,GAAmB,uBAAA;AAAA;AAAA,KAGzB,oBAAA;EAAA,SACM,IAAA;EAAA,SACA,IAAI;AAAA;AAAA,KAGV,qBAAA;EAAA,SACM,IAAA;EAAA,SACA,SAAS;AAAA;AAAA,KAGf,oBAAA;EAAA,SAEU,IAAA;EAAA,SACA,QAAA;EAAA,SACA,SAAA;AAAA;EAAA,SAGA,IAAA;EAAA,SACA,QAAA;AAAA;AAAA,KAGV,uBAAA,GAA0B,oBAAA,GAAuB,qBAAA,GAAwB,oBAAA;AAAA,KAEzE,mBAAA;EAAA,SACM,IAAA;EAAA,SACA,OAAA,WAAkB,aAAa,CAAC,uBAAA;AAAA;AAAA,KAGtC,wBAAA;EAAA,SACM,IAAA;EAAA,SACA,OAAA;EAAA,SACA,IAAA;EAAA,SACA,SAAA;AAAA;AAAA,KAGN,0BAAA;EAAA,SACM,IAAA;EAAA,SACA,OAAA;EAAA,SACA,MAAA,WAAiB,aAAa,CAAC,uBAAA;AAAA;AAAA,KAGrC,gBAAA,GAAmB,mBAAA,GAAsB,wBAAA,GAA2B,0BAAA;AAAA,KAEpE,WAAA;EAAA,SACM,IAAA;EAAA,SACA,IAAA;EAAA,SACA,WAAA;EAAA,SACA,UAAA;AAAA;AAAA,KAGN,kBAAA;EAAA,SACM,KAAA;EAAA,SACA,YAAA;EAAA,SACA,KAAA,EAAO,aAAA,CAAc,gBAAA;EAAA,SACrB,KAAA;EAAA,SACA,MAAA;EAAA,SACA,iBAAA;EAAA,SACA,SAAA;IAAA,SACE,MAAA,EAAQ,oBAAA;IAAA,SACR,OAAA,EAAS,uBAAA;EAAA;EAAA,SAEX,KAAA,GAAQ,aAAA,CAAc,WAAA;EAAA,SACtB,mBAAA;AAAA;AAAA,cASE,oBAAA,GACX,OAAA,EAAS,UAAA,EACT,MAAA;EAAA,SACW,eAAA;EAAA,SACA,sBAAA,GAAyB,oBAAA;EAAA,SACzB,gBAAA,GAAmB,uBAAA;AAAA,MAE7B,MAAA,CAAO,MAAA,CAAO,kBAAA,EAAoB,QAAA;AAAA,cAYxB,qBAAA,GAAyB,QAAA,EAAU,kBAAA,CAAmB,kBAAA,6BAAkB,MAAA,gCAAA,YAAA,kCAAA,iBAAA,kCAAA,OAAA,kCAAA,WAAA,kCAAA,iBAAA,kCAAA,iBAAA,kCAAA,qBAAA,kCAAA,QAAA,EAAA,QAAA;AAAA,cAGxE,wBAAA,GAA4B,MAAA,EAAQ,qBAAqB,4BAAA,KAAA,gCAAA,WAAA,mDAAA,UAAA"}
|
|
@@ -21,7 +21,10 @@ const makeXAiGrokProviderLayer = (config) => makeOpenAiResponsesProviderLayer({
|
|
|
21
21
|
providerId: xAiGrokProviderDescriptor.providerId,
|
|
22
22
|
providerName: xAiGrokProviderDescriptor.providerName,
|
|
23
23
|
responsesUrl: config.responsesUrl ?? "https://cli-chat-proxy.grok.com/v1/responses",
|
|
24
|
-
authorizationHeaders:
|
|
24
|
+
authorizationHeaders: (token, model) => ({
|
|
25
|
+
...xAiGrokAuthorizationHeaders(token, model),
|
|
26
|
+
"x-grok-client-version": config.clientVersion
|
|
27
|
+
}),
|
|
25
28
|
alwaysIncludeReasoning: false,
|
|
26
29
|
allowEofCompletion: false,
|
|
27
30
|
expectedTokenProvider: xAiGrokProviderId
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grok-provider.mjs","names":[],"sources":["../../../src/providers/xai/grok-provider.ts"],"sourcesContent":["import type { AgentReasoningEffort } from '@yolk-sdk/agent/protocol'\nimport { Effect } from 'effect'\nimport type { LLMError, LLMRequest } from '@yolk-sdk/agent/loop'\nimport type { OAuthAccessToken } from '@yolk-sdk/agent/oauth'\nimport type { HttpClientResponse } from 'effect/unstable/http'\nimport {\n makeOpenAiResponsesProviderLayer,\n streamOpenAiResponsesResponse,\n toOpenAiResponsesRequestBody,\n withOpenAiResponsesProviderName\n} from '../openai-responses-provider-internal.ts'\nimport { xAiGrokAuthorizationHeaders, xAiGrokProviderId, xAiGrokResponsesUrl } from './grok.ts'\n\nexport type XAiGrokReasoningSummary = 'auto' | 'concise' | 'detailed'\n\nexport type XAiGrokProviderConfig = {\n readonly token: OAuthAccessToken\n readonly maxOutputTokens: number\n /** Override only with a trusted proxy because the OAuth bearer is sent to this URL. */\n readonly responsesUrl?: string\n readonly extraHeaders?: Readonly<Record<string, string>>\n readonly defaultReasoningEffort?: AgentReasoningEffort\n readonly reasoningSummary?: XAiGrokReasoningSummary\n}\n\ntype XAiGrokInputTextPart = {\n readonly type: 'input_text'\n readonly text: string\n}\n\ntype XAiGrokInputImagePart = {\n readonly type: 'input_image'\n readonly image_url: string\n}\n\ntype XAiGrokInputFilePart =\n | {\n readonly type: 'input_file'\n readonly filename: string\n readonly file_data: string\n }\n | {\n readonly type: 'input_file'\n readonly file_url: string\n }\n\ntype XAiGrokInputContentPart = XAiGrokInputTextPart | XAiGrokInputImagePart | XAiGrokInputFilePart\n\ntype XAiGrokMessageInput = {\n readonly role: 'user' | 'assistant'\n readonly content: string | ReadonlyArray<XAiGrokInputContentPart>\n}\n\ntype XAiGrokFunctionCallInput = {\n readonly type: 'function_call'\n readonly call_id: string\n readonly name: string\n readonly arguments: string\n}\n\ntype XAiGrokFunctionOutputInput = {\n readonly type: 'function_call_output'\n readonly call_id: string\n readonly output: string | ReadonlyArray<XAiGrokInputContentPart>\n}\n\ntype XAiGrokInputItem = XAiGrokMessageInput | XAiGrokFunctionCallInput | XAiGrokFunctionOutputInput\n\ntype XAiGrokTool = {\n readonly type: 'function'\n readonly name: string\n readonly description: string\n readonly parameters: unknown\n}\n\ntype XAiGrokRequestBody = {\n readonly model: string\n readonly instructions: string\n readonly input: ReadonlyArray<XAiGrokInputItem>\n readonly store: false\n readonly stream: true\n readonly max_output_tokens: number\n readonly reasoning?: {\n readonly effort: AgentReasoningEffort\n readonly summary: XAiGrokReasoningSummary\n }\n readonly tools?: ReadonlyArray<XAiGrokTool>\n readonly parallel_tool_calls?: true\n}\n\nconst xAiGrokProviderDescriptor = {\n providerId: 'xai_grok',\n providerName: 'xAI Grok subscription',\n allowEofCompletion: false\n} as const\n\nexport const toXAiGrokRequestBody = (\n request: LLMRequest,\n config: {\n readonly maxOutputTokens: number\n readonly defaultReasoningEffort?: AgentReasoningEffort\n readonly reasoningSummary?: XAiGrokReasoningSummary\n }\n): Effect.Effect<XAiGrokRequestBody, LLMError> =>\n toOpenAiResponsesRequestBody(request, {\n ...config,\n providerName: xAiGrokProviderDescriptor.providerName,\n alwaysIncludeReasoning: false\n }).pipe(\n Effect.map(body => ({ ...body, max_output_tokens: config.maxOutputTokens })),\n Effect.mapError(error =>\n withOpenAiResponsesProviderName(xAiGrokProviderDescriptor.providerName, error)\n )\n )\n\nexport const streamXAiGrokResponse = (response: HttpClientResponse.HttpClientResponse) =>\n streamOpenAiResponsesResponse(xAiGrokProviderDescriptor, response)\n\nexport const makeXAiGrokProviderLayer = (config: XAiGrokProviderConfig) =>\n makeOpenAiResponsesProviderLayer({\n ...config,\n providerId: xAiGrokProviderDescriptor.providerId,\n providerName: xAiGrokProviderDescriptor.providerName,\n responsesUrl: config.responsesUrl ?? xAiGrokResponsesUrl,\n authorizationHeaders: xAiGrokAuthorizationHeaders,\n alwaysIncludeReasoning: false,\n allowEofCompletion: false,\n expectedTokenProvider: xAiGrokProviderId\n })\n"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"grok-provider.mjs","names":[],"sources":["../../../src/providers/xai/grok-provider.ts"],"sourcesContent":["import type { AgentReasoningEffort } from '@yolk-sdk/agent/protocol'\nimport { Effect } from 'effect'\nimport type { LLMError, LLMRequest } from '@yolk-sdk/agent/loop'\nimport type { OAuthAccessToken } from '@yolk-sdk/agent/oauth'\nimport type { HttpClientResponse } from 'effect/unstable/http'\nimport {\n makeOpenAiResponsesProviderLayer,\n streamOpenAiResponsesResponse,\n toOpenAiResponsesRequestBody,\n withOpenAiResponsesProviderName\n} from '../openai-responses-provider-internal.ts'\nimport { xAiGrokAuthorizationHeaders, xAiGrokProviderId, xAiGrokResponsesUrl } from './grok.ts'\n\nexport type XAiGrokReasoningSummary = 'auto' | 'concise' | 'detailed'\n\nexport type XAiGrokProviderConfig = {\n readonly token: OAuthAccessToken\n readonly maxOutputTokens: number\n /**\n * Grok CLI client version sent as `x-grok-client-version`. The xAI CLI proxy version-gates\n * requests and rejects missing or outdated versions with HTTP 426. The host owns this value and\n * must use the proxy only as permitted by xAI's terms.\n */\n readonly clientVersion: string\n /** Override only with a trusted proxy because the OAuth bearer is sent to this URL. */\n readonly responsesUrl?: string\n readonly extraHeaders?: Readonly<Record<string, string>>\n readonly defaultReasoningEffort?: AgentReasoningEffort\n readonly reasoningSummary?: XAiGrokReasoningSummary\n}\n\ntype XAiGrokInputTextPart = {\n readonly type: 'input_text'\n readonly text: string\n}\n\ntype XAiGrokInputImagePart = {\n readonly type: 'input_image'\n readonly image_url: string\n}\n\ntype XAiGrokInputFilePart =\n | {\n readonly type: 'input_file'\n readonly filename: string\n readonly file_data: string\n }\n | {\n readonly type: 'input_file'\n readonly file_url: string\n }\n\ntype XAiGrokInputContentPart = XAiGrokInputTextPart | XAiGrokInputImagePart | XAiGrokInputFilePart\n\ntype XAiGrokMessageInput = {\n readonly role: 'user' | 'assistant'\n readonly content: string | ReadonlyArray<XAiGrokInputContentPart>\n}\n\ntype XAiGrokFunctionCallInput = {\n readonly type: 'function_call'\n readonly call_id: string\n readonly name: string\n readonly arguments: string\n}\n\ntype XAiGrokFunctionOutputInput = {\n readonly type: 'function_call_output'\n readonly call_id: string\n readonly output: string | ReadonlyArray<XAiGrokInputContentPart>\n}\n\ntype XAiGrokInputItem = XAiGrokMessageInput | XAiGrokFunctionCallInput | XAiGrokFunctionOutputInput\n\ntype XAiGrokTool = {\n readonly type: 'function'\n readonly name: string\n readonly description: string\n readonly parameters: unknown\n}\n\ntype XAiGrokRequestBody = {\n readonly model: string\n readonly instructions: string\n readonly input: ReadonlyArray<XAiGrokInputItem>\n readonly store: false\n readonly stream: true\n readonly max_output_tokens: number\n readonly reasoning?: {\n readonly effort: AgentReasoningEffort\n readonly summary: XAiGrokReasoningSummary\n }\n readonly tools?: ReadonlyArray<XAiGrokTool>\n readonly parallel_tool_calls?: true\n}\n\nconst xAiGrokProviderDescriptor = {\n providerId: 'xai_grok',\n providerName: 'xAI Grok subscription',\n allowEofCompletion: false\n} as const\n\nexport const toXAiGrokRequestBody = (\n request: LLMRequest,\n config: {\n readonly maxOutputTokens: number\n readonly defaultReasoningEffort?: AgentReasoningEffort\n readonly reasoningSummary?: XAiGrokReasoningSummary\n }\n): Effect.Effect<XAiGrokRequestBody, LLMError> =>\n toOpenAiResponsesRequestBody(request, {\n ...config,\n providerName: xAiGrokProviderDescriptor.providerName,\n alwaysIncludeReasoning: false\n }).pipe(\n Effect.map(body => ({ ...body, max_output_tokens: config.maxOutputTokens })),\n Effect.mapError(error =>\n withOpenAiResponsesProviderName(xAiGrokProviderDescriptor.providerName, error)\n )\n )\n\nexport const streamXAiGrokResponse = (response: HttpClientResponse.HttpClientResponse) =>\n streamOpenAiResponsesResponse(xAiGrokProviderDescriptor, response)\n\nexport const makeXAiGrokProviderLayer = (config: XAiGrokProviderConfig) =>\n makeOpenAiResponsesProviderLayer({\n ...config,\n providerId: xAiGrokProviderDescriptor.providerId,\n providerName: xAiGrokProviderDescriptor.providerName,\n responsesUrl: config.responsesUrl ?? xAiGrokResponsesUrl,\n authorizationHeaders: (token, model) => ({\n ...xAiGrokAuthorizationHeaders(token, model),\n 'x-grok-client-version': config.clientVersion\n }),\n alwaysIncludeReasoning: false,\n allowEofCompletion: false,\n expectedTokenProvider: xAiGrokProviderId\n })\n"],"mappings":";;;;AAgGA,MAAM,4BAA4B;CAChC,YAAY;CACZ,cAAc;CACd,oBAAoB;AACtB;AAEA,MAAa,wBACX,SACA,WAMA,6BAA6B,SAAS;CACpC,GAAG;CACH,cAAc,0BAA0B;CACxC,wBAAwB;AAC1B,CAAC,EAAE,KACD,OAAO,KAAI,UAAS;CAAE,GAAG;CAAM,mBAAmB,OAAO;AAAgB,EAAE,GAC3E,OAAO,UAAS,UACd,gCAAgC,0BAA0B,cAAc,KAAK,CAC/E,CACF;AAEF,MAAa,yBAAyB,aACpC,8BAA8B,2BAA2B,QAAQ;AAEnE,MAAa,4BAA4B,WACvC,iCAAiC;CAC/B,GAAG;CACH,YAAY,0BAA0B;CACtC,cAAc,0BAA0B;CACxC,cAAc,OAAO,gBAAA;CACrB,uBAAuB,OAAO,WAAW;EACvC,GAAG,4BAA4B,OAAO,KAAK;EAC3C,yBAAyB,OAAO;CAClC;CACA,wBAAwB;CACxB,oBAAoB;CACpB,uBAAuB;AACzB,CAAC"}
|
|
@@ -27,6 +27,7 @@ declare const mergeSkillsets: (sources: ReadonlyArray<SkillsetSource>) => Effect
|
|
|
27
27
|
readonly template: string;
|
|
28
28
|
readonly description?: string | undefined;
|
|
29
29
|
readonly source?: string | undefined;
|
|
30
|
+
readonly location?: string | undefined;
|
|
30
31
|
readonly arguments?: readonly {
|
|
31
32
|
readonly required: boolean;
|
|
32
33
|
readonly name: string;
|
|
@@ -34,7 +35,6 @@ declare const mergeSkillsets: (sources: ReadonlyArray<SkillsetSource>) => Effect
|
|
|
34
35
|
}[] | undefined;
|
|
35
36
|
readonly access?: "read" | "write" | "destructive" | undefined;
|
|
36
37
|
readonly fileRefs?: boolean | undefined;
|
|
37
|
-
readonly location?: string | undefined;
|
|
38
38
|
}[];
|
|
39
39
|
}, SkillsetError, never>;
|
|
40
40
|
//#endregion
|
package/dist/skillset/name.d.mts
CHANGED
|
@@ -3,8 +3,8 @@ import { Effect } from "effect";
|
|
|
3
3
|
|
|
4
4
|
//#region src/skillset/name.d.ts
|
|
5
5
|
declare const isValidSkillsetName: (name: string) => boolean;
|
|
6
|
-
declare const validateSkillsetName: (name: string) => Effect.Effect<
|
|
7
|
-
declare const validateDirectoryName: (expected: string, actual: string) => Effect.Effect<
|
|
6
|
+
declare const validateSkillsetName: (name: string) => Effect.Effect<never, SkillsetError, never> | Effect.Effect<string, never, never>;
|
|
7
|
+
declare const validateDirectoryName: (expected: string, actual: string) => Effect.Effect<never, SkillsetError, never> | Effect.Effect<string, never, never>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { isValidSkillsetName, validateDirectoryName, validateSkillsetName };
|
|
10
10
|
//# sourceMappingURL=name.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"name.d.mts","names":[],"sources":["../../src/skillset/name.ts"],"mappings":";;;;cAMa,mBAAA,GAAuB,IAAY;AAAA,cAGnC,oBAAA,GAAwB,IAAA,aAAY,MAAA,CAAA,MAAA,
|
|
1
|
+
{"version":3,"file":"name.d.mts","names":[],"sources":["../../src/skillset/name.ts"],"mappings":";;;;cAMa,mBAAA,GAAuB,IAAY;AAAA,cAGnC,oBAAA,GAAwB,IAAA,aAAY,MAAA,CAAA,MAAA,QAAA,aAAA,WAAA,MAAA,CAAA,MAAA;AAAA,cAUpC,qBAAA,GAAyB,QAAA,UAAkB,MAAA,aAAc,MAAA,CAAA,MAAA,QAAA,aAAA,WAAA,MAAA,CAAA,MAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yolk-sdk/agent",
|
|
3
|
-
"version": "0.1.0-canary.
|
|
3
|
+
"version": "0.1.0-canary.63",
|
|
4
4
|
"description": "Protocol, loop, runtime, client, compaction, tools, React, providers, OAuth, skillset, and voice primitives for building Yolk agents.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -16,6 +16,12 @@ export type XAiGrokReasoningSummary = 'auto' | 'concise' | 'detailed'
|
|
|
16
16
|
export type XAiGrokProviderConfig = {
|
|
17
17
|
readonly token: OAuthAccessToken
|
|
18
18
|
readonly maxOutputTokens: number
|
|
19
|
+
/**
|
|
20
|
+
* Grok CLI client version sent as `x-grok-client-version`. The xAI CLI proxy version-gates
|
|
21
|
+
* requests and rejects missing or outdated versions with HTTP 426. The host owns this value and
|
|
22
|
+
* must use the proxy only as permitted by xAI's terms.
|
|
23
|
+
*/
|
|
24
|
+
readonly clientVersion: string
|
|
19
25
|
/** Override only with a trusted proxy because the OAuth bearer is sent to this URL. */
|
|
20
26
|
readonly responsesUrl?: string
|
|
21
27
|
readonly extraHeaders?: Readonly<Record<string, string>>
|
|
@@ -122,7 +128,10 @@ export const makeXAiGrokProviderLayer = (config: XAiGrokProviderConfig) =>
|
|
|
122
128
|
providerId: xAiGrokProviderDescriptor.providerId,
|
|
123
129
|
providerName: xAiGrokProviderDescriptor.providerName,
|
|
124
130
|
responsesUrl: config.responsesUrl ?? xAiGrokResponsesUrl,
|
|
125
|
-
authorizationHeaders:
|
|
131
|
+
authorizationHeaders: (token, model) => ({
|
|
132
|
+
...xAiGrokAuthorizationHeaders(token, model),
|
|
133
|
+
'x-grok-client-version': config.clientVersion
|
|
134
|
+
}),
|
|
126
135
|
alwaysIncludeReasoning: false,
|
|
127
136
|
allowEofCompletion: false,
|
|
128
137
|
expectedTokenProvider: xAiGrokProviderId
|