mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 15:10:52 +00:00
refactor: trim extension helper exports
This commit is contained in:
@@ -26,7 +26,7 @@ function normalizeFutureEpochSeconds(value: unknown): number | undefined {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
export function decodeCodexJwtPayload(accessToken: string): CodexJwtPayload | null {
|
||||
function decodeCodexJwtPayload(accessToken: string): CodexJwtPayload | null {
|
||||
const parts = accessToken.split(".");
|
||||
if (parts.length !== 3) {
|
||||
return null;
|
||||
@@ -41,7 +41,7 @@ export function decodeCodexJwtPayload(accessToken: string): CodexJwtPayload | nu
|
||||
}
|
||||
}
|
||||
|
||||
export function resolveCodexStableSubject(payload: CodexJwtPayload | null): string | undefined {
|
||||
function resolveCodexStableSubject(payload: CodexJwtPayload | null): string | undefined {
|
||||
const auth = payload?.["https://api.openai.com/auth"];
|
||||
const accountUserId = trimNonEmptyString(auth?.chatgpt_account_user_id);
|
||||
if (accountUserId) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { ModelProviderConfig } from "openclaw/plugin-sdk/provider-model-shared";
|
||||
import { OPENAI_CODEX_RESPONSES_BASE_URL } from "./base-url.js";
|
||||
|
||||
export const OPENAI_CODEX_BASE_URL = OPENAI_CODEX_RESPONSES_BASE_URL;
|
||||
const OPENAI_CODEX_BASE_URL = OPENAI_CODEX_RESPONSES_BASE_URL;
|
||||
|
||||
export function buildOpenAICodexProvider(): ModelProviderConfig {
|
||||
return {
|
||||
|
||||
@@ -32,7 +32,7 @@ type SyntheticOpenAIModelCatalogEntry = {
|
||||
cost?: SyntheticOpenAIModelCatalogCost;
|
||||
};
|
||||
|
||||
export const OPENAI_API_BASE_URL = "https://api.openai.com/v1";
|
||||
const OPENAI_API_BASE_URL = "https://api.openai.com/v1";
|
||||
|
||||
export function toOpenAIDataUrl(buffer: Buffer, mimeType: string): string {
|
||||
return `data:${mimeType};base64,${buffer.toString("base64")}`;
|
||||
@@ -48,7 +48,7 @@ function hasSupportedOpenAIResponsesTransport(
|
||||
return transport === "auto" || transport === "sse" || transport === "websocket";
|
||||
}
|
||||
|
||||
export function defaultOpenAIResponsesExtraParams(
|
||||
function defaultOpenAIResponsesExtraParams(
|
||||
extraParams: Record<string, unknown> | undefined,
|
||||
options?: { openaiWsWarmup?: boolean },
|
||||
): Record<string, unknown> | undefined {
|
||||
|
||||
Reference in New Issue
Block a user