@razroo/ray-core
v0.3.0
Published
Shared types and primitives for Ray inference gateway
Maintainers
Readme
@razroo/ray-core
Shared TypeScript types, errors, and utility helpers for the Ray inference gateway and SDK.
Install
bun add @razroo/ray-coreMost applications should install @razroo/ray-sdk, which depends on this package and provides the HTTP client.
Usage
import type { HealthSnapshot, InferenceRequest, InferenceResponse } from "@razroo/ray-core";
import { RayError, toErrorMessage } from "@razroo/ray-core";
export function assertInferenceRequest(request: InferenceRequest): void {
if (!request.input.trim()) {
throw new RayError("Inference input is required", {
code: "invalid_request",
status: 400,
});
}
}
export function logInferenceError(error: unknown): string {
return toErrorMessage(error);
}@razroo/ray-core does not start a gateway or model backend. It only publishes the shared contracts used by the gateway, the SDK, and downstream integrations.
