3b8345dfe0
REQ-006: configure BYOM endpoint (URL in DB, key in secret manager) REQ-007: validate-on-save test inference call (OpenAI-compatible) REQ-008: route all inference to BYOM (G-001: test-inference proxy endpoint) REQ-009: reject when unconfigured/unreachable (ByomUnconfiguredError/ByomUnreachableError) ---ci--- phase: 3 milestone: v0.1 status: execute ---/ci---
39 lines
1.2 KiB
TypeScript
39 lines
1.2 KiB
TypeScript
/**
|
|
* @coreci/byom — Bring Your Own Model: endpoint registry, validate-on-save,
|
|
* and the OpenAI-compatible routing shim (Wave C, REQ-006..009).
|
|
*
|
|
* D-001: the wire protocol is OpenAI-compatible `/v1/chat/completions`.
|
|
* G-001: the routing shim is the single egress point for LLM inference; the
|
|
* M1 test-inference proxy endpoint drives it until M3 orchestration lands.
|
|
*
|
|
* Exports:
|
|
* - types: ByomEndpoint, ByomConfigRequest, ByomValidationResult,
|
|
* ChatCompletionRequest, ChatCompletionResponse
|
|
* - validator: validateEndpoint (REQ-007)
|
|
* - repository: saveEndpoint, getEndpoint, deleteEndpoint (REQ-006)
|
|
* - router: routeInference, ByomUnconfiguredError, ByomUnreachableError (REQ-008, REQ-009)
|
|
*/
|
|
|
|
export type {
|
|
ByomEndpoint,
|
|
ByomConfigRequest,
|
|
ByomValidationResult,
|
|
ChatCompletionRequest,
|
|
ChatCompletionResponse,
|
|
} from "./types.js";
|
|
|
|
export { validateEndpoint } from "./validator.js";
|
|
|
|
export {
|
|
saveEndpoint,
|
|
getEndpoint,
|
|
deleteEndpoint,
|
|
BYOM_SECRET_NAME,
|
|
type SaveEndpointResult,
|
|
} from "./repository.js";
|
|
|
|
export {
|
|
routeInference,
|
|
ByomUnconfiguredError,
|
|
ByomUnreachableError,
|
|
} from "./router.js"; |