@nyrra/foundry-ai
Version:
Thin Palantir Foundry provider adapters and model catalog for the Vercel AI SDK.
43 lines (41 loc) • 1.72 kB
text/typescript
interface FoundryConfig {
foundryUrl: string;
token: string;
attributionRid?: string;
traceParent?: string;
traceState?: string;
}
type ModelProvider = 'openai' | 'anthropic' | 'google' | 'third-party';
type ModelLifecycle = 'ga' | 'experimental';
type ModelInputType = 'CLAUDE_CHAT' | 'GEMINI_CHAT' | 'GENERIC_CHAT_COMPLETION' | 'GENERIC_COMPLETION' | 'GENERIC_VISION_COMPLETION' | 'GPT_CHAT_COMPLETION' | 'GPT_WITH_VISION_COMPLETION' | 'OPEN_AI_REASONING' | 'OPEN_AI_RESPONSES' | 'OPEN_AI_EMBEDDINGS' | 'X_AI_RESPONSES';
type ModelCost = 'LOW' | 'MEDIUM' | 'HIGH';
type ModelClass = 'HEAVYWEIGHT' | 'LIGHTWEIGHT' | 'REASONING';
type ModelSpeed = 'LOW' | 'MEDIUM' | 'HIGH';
interface ModelPerformance {
cost: ModelCost;
modelClass: ModelClass;
speed?: ModelSpeed;
}
interface ModelDefinition {
rid: string;
modelIdentifier: string;
displayName: string;
lifecycle: ModelLifecycle;
inputTypes: readonly ModelInputType[];
trainingCutoffDate?: string;
performance: ModelPerformance;
externalUrl?: string;
modelCreator?: string;
/** Verified proxy route; enrollment alone does not imply proxy support. */
transport?: 'openai-chat' | 'openai-responses' | 'xai-responses' | 'unavailable';
}
interface ModelMetadata extends ModelDefinition {
provider: ModelProvider;
supportsVision: boolean;
supportsResponses: boolean;
}
interface ResolvedModelTarget {
rid: string;
metadata?: ModelMetadata;
}
export type { FoundryConfig as F, ModelMetadata as M, ResolvedModelTarget as R, ModelProvider as a, ModelClass as b, ModelCost as c, ModelDefinition as d, ModelInputType as e, ModelLifecycle as f, ModelPerformance as g, ModelSpeed as h };