ci: add typechecking, fail fast in CI, and patch typechecking errors (#63)

This commit is contained in:
Charles Packer
2025-11-04 11:50:07 -08:00
committed by GitHub
parent 42eb671bf4
commit cf73f3a11f
27 changed files with 183 additions and 69 deletions

View File

@@ -25,7 +25,13 @@ export function resolveModel(modelIdentifier: string): string | null {
*/
export function getDefaultModel(): string {
const defaultModel = models.find((m) => m.isDefault);
return defaultModel?.handle || models[0].handle;
if (defaultModel) return defaultModel.handle;
const firstModel = models[0];
if (!firstModel) {
throw new Error("No models available in models.json");
}
return firstModel.handle;
}
/**