Connection
Base URL, credentials and a reachable server.
Validate environment configuration before starting a service. Reject missing or out-of-range ports and report the variable name without printing secrets.
Base URL, credentials and a reachable server.
A model available through the configured endpoint.
Context limits and tool support are determined by the model and server.
const port = Number(env.PORT);
if (!Number.isInteger(port) || port < 1 || port > 65535) {
throw new Error('Invalid PORT');
}
return { port };