UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

23 lines • 1.17 kB
/** * Providers whose transport cannot send requests to another address: the cursor-cli-oauth lane spawns the * Cursor CLI, which has no base-URL option (senpi#4765). Keyed by provider id; the value names the service. */ const FIXED_ADDRESS_PROVIDERS = new Map([["cursor-cli-oauth", "Cursor"]]); function setsBaseUrl(config) { return config.baseUrl !== undefined || (config.models ?? []).some((model) => model.baseUrl !== undefined); } /** * One notice per fixed-address provider whose models.json entry sets a `baseUrl` (provider-level or * `models[i].baseUrl`): the setting is kept, but requests still go to the provider's own service. */ export function fixedAddressBaseUrlNotices(providers) { const notices = []; for (const [providerId, service] of FIXED_ADDRESS_PROVIDERS) { const config = providers.get(providerId); if (config === undefined || !setsBaseUrl(config)) continue; notices.push(`models.json sets a baseUrl for ${providerId}, but ${service} does not support changing the address. Requests still go to ${service}.`); } return notices; } //# sourceMappingURL=provider-base-url-notice.js.map