Files
Jyotisha/frontend/src/mastra/model.ts
T
Jesse_Chen bf8ad0d1ff fix(web): keep consultation conclusions across turns and surface cache hits (BUG-555, BUG-556)
Session history was silently clipped to the first 4000 characters of the last 12 messages, so follow-ups could not see timing or audit tables. Keep an append-only tail plus a checkpoint summary, retry overflow in the same request, and expose cache hit rate in admin usage.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-06 15:16:18 +08:00

35 lines
1.0 KiB
TypeScript

import type { MastraModelConfig } from "@mastra/core/llm";
export type LanguageModelMode = "openai" | "compatible" | "anthropic";
export type PublicLanguageModel = {
readonly id: string;
readonly label: string;
readonly description: string;
readonly creditCost: number;
readonly isDefault: boolean;
};
export type ResolvedLanguageModel = PublicLanguageModel & {
readonly mode: LanguageModelMode;
readonly model: MastraModelConfig;
readonly configVersion?: number;
readonly inputCostMicrousdPerMillion?: number;
readonly outputCostMicrousdPerMillion?: number;
readonly contextWindow?: number | null;
};
export type LanguageModelCatalog = {
readonly models: readonly ResolvedLanguageModel[];
readonly publicModels: readonly PublicLanguageModel[];
readonly defaultModelId: string | null;
readonly issues: readonly string[];
};
export const languageModelCatalog: LanguageModelCatalog = {
models: [],
publicModels: [],
defaultModelId: null,
issues: ["database_model_catalog_required"],
};