refactor: trim extension helper exports

This commit is contained in:
Peter Steinberger
2026-05-01 15:21:30 +01:00
parent 05f607c149
commit 4f7286ce86
5 changed files with 10 additions and 10 deletions

View File

@@ -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) {

View File

@@ -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 {

View File

@@ -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 {