mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-20 10:31:35 +00:00
refactor(xai): localize internal declarations (#102778)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// Xai helper module supports code execution config behavior.
|
||||
import { isXaiToolEnabled, type XaiToolAuthContext } from "./tool-auth-shared.js";
|
||||
|
||||
export type CodeExecutionConfig = {
|
||||
type CodeExecutionConfig = {
|
||||
enabled?: boolean;
|
||||
model?: string;
|
||||
maxTurns?: number;
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
type WebSearchProviderPlugin,
|
||||
} from "openclaw/plugin-sdk/provider-web-search-config-contract";
|
||||
|
||||
export const XAI_WEB_SEARCH_CREDENTIAL_PATH = "plugins.entries.xai.config.webSearch.apiKey";
|
||||
const XAI_WEB_SEARCH_CREDENTIAL_PATH = "plugins.entries.xai.config.webSearch.apiKey";
|
||||
|
||||
export function buildXaiWebSearchProviderBase(): Omit<
|
||||
WebSearchProviderPlugin,
|
||||
|
||||
@@ -18,13 +18,13 @@ import { applyXaiConfig, XAI_DEFAULT_MODEL_REF } from "./onboard.js";
|
||||
import { xaiUserAgent } from "./src/xai-user-agent.js";
|
||||
|
||||
const PROVIDER_ID = "xai";
|
||||
export const XAI_OAUTH_METHOD_ID = "oauth";
|
||||
export const XAI_OAUTH_CHOICE_ID = "xai-oauth";
|
||||
export const XAI_DEVICE_CODE_METHOD_ID = "device-code";
|
||||
export const XAI_DEVICE_CODE_CHOICE_ID = "xai-device-code";
|
||||
const XAI_OAUTH_METHOD_ID = "oauth";
|
||||
const XAI_OAUTH_CHOICE_ID = "xai-oauth";
|
||||
const XAI_DEVICE_CODE_METHOD_ID = "device-code";
|
||||
const XAI_DEVICE_CODE_CHOICE_ID = "xai-device-code";
|
||||
export const XAI_OAUTH_CLIENT_ID = "b1a00492-073a-47ea-816f-4c329264a828";
|
||||
export const XAI_OAUTH_SCOPE = "openid profile email offline_access grok-cli:access api:access";
|
||||
export const XAI_OAUTH_ISSUER = "https://auth.x.ai";
|
||||
const XAI_OAUTH_ISSUER = "https://auth.x.ai";
|
||||
export const XAI_OAUTH_DISCOVERY_URL = `${XAI_OAUTH_ISSUER}/.well-known/openid-configuration`;
|
||||
const XAI_LEGACY_OAUTH_TOKEN_ENDPOINT = `${XAI_OAUTH_ISSUER}/oauth/token`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user