2026-06-13 10:13:37 -04:00
|
|
|
// Model defaults centralized (was scattered as `m.type || "llm"`, `quotaFamily || "normal"`, etc.)
|
2026-06-13 06:05:42 -04:00
|
|
|
export const MODEL_DEFAULTS = {
|
|
|
|
|
type: "llm",
|
|
|
|
|
quotaFamily: "normal",
|
|
|
|
|
strip: [],
|
2026-06-13 10:13:37 -04:00
|
|
|
targetFormat: null
|
2026-06-13 06:05:42 -04:00
|
|
|
};
|
|
|
|
|
|
2026-06-13 10:13:37 -04:00
|
|
|
// Resolve a single field with its default (keeps accessor call-sites one-liners)
|
|
|
|
|
export function modelType(model) {
|
|
|
|
|
return model?.type || MODEL_DEFAULTS.type;
|
2026-06-13 06:05:42 -04:00
|
|
|
}
|
2026-06-13 10:13:37 -04:00
|
|
|
export function modelQuotaFamily(model) {
|
|
|
|
|
return model?.quotaFamily || MODEL_DEFAULTS.quotaFamily;
|
|
|
|
|
}
|
|
|
|
|
export function modelStrip(model) {
|
|
|
|
|
return model?.strip || [];
|
|
|
|
|
}
|
|
|
|
|
export function modelTargetFormat(model) {
|
|
|
|
|
return model?.targetFormat || MODEL_DEFAULTS.targetFormat;
|
2026-06-13 06:05:42 -04:00
|
|
|
}
|