resolveEndpointRuntime (types/endpoints.ts)

librechat · packages/api/src/types/endpoints.ts · typescript · MIT
database

Resolves runtime context for API endpoint initialization from request or pre‑provided context.

// Source: https://github.com/danny-avila/librechat | License: MIT | Copyright 2026 LibreChat
// Provided via justclaw.it.com; keep this notice with the code.
import type { ClientOptions, OpenAIClientOptions } from '@librechat/agents';
import type { AppConfig, IUser } from '@librechat/data-schemas';
import type { TConfig } from 'librechat-data-provider';
import type { ReasoningCapabilityDeps } from './reasoning';
import type { RequestBody, ServerRequest } from './http';
import type { EndpointTokenConfig } from './tokens';
import type { AzureOptions } from './azure';

export type TCustomEndpointsConfig = Partial<{ [key: string]: Omit<TConfig, 'order'> }>;

/**
 * Interface for user key values retrieved from the database
 */
export interface UserKeyValues {
  apiKey?: string;
  baseURL?: str

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key