import type { RequestAttribution } from "@velum-labs/routekit-contracts"; import type { AnthropicRequest } from "../adapters/anthropic-wire.js"; import type { WireRejection } from "../adapters/validate.js"; import { type Backend, type BackendRequest, type BackendRequestOptions } from "../providers/backend.js"; import { type CompositionalRoutingRuntime } from "../routing/eval-policy.js"; import type { EndpointAuthenticator, EndpointContext, EndpointObserver } from "./endpoint-module.js"; import { GatewayEndpoint } from "./endpoint-module.js"; export type AnthropicMessagesOperation = "messages" | "count-tokens"; type AnthropicRequestRelay = Readonly<{ shouldRelay(headers: EndpointContext["headers"], model: string | undefined, servesLocally: (model: string) => boolean): boolean; relay(headers: EndpointContext["headers"], body: AnthropicRequest, signal?: AbortSignal, options?: Pick): BackendRequest; }>; type AnthropicTokenCountRelay = Readonly<{ countTokens(headers: EndpointContext["headers"], body: AnthropicRequest, signal?: AbortSignal): BackendRequest; }>; export type AnthropicEndpointDependencies = Readonly<{ backend: Backend; compositionalRouting?: CompositionalRoutingRuntime; requestRelay?: AnthropicRequestRelay; tokenCountRelay?: AnthropicTokenCountRelay; rejectInvalid(context: EndpointContext, rejection: WireRejection | undefined): boolean; attribution(requested: string | undefined, nativeProvider?: "claude-code"): Partial; }>; export declare class AnthropicMessagesEndpoint extends GatewayEndpoint { constructor(authenticate: EndpointAuthenticator, dependencies: AnthropicEndpointDependencies, observe?: EndpointObserver); matches(method: string, path: string): boolean; protected decodeOperation(context: EndpointContext): AnthropicMessagesOperation; } export {};