fix: apply lint fixes

This commit is contained in:
Peter Steinberger
2026-01-13 03:36:32 +00:00
parent df6634727e
commit 66ad8a9289
7 changed files with 20 additions and 15 deletions

View File

@@ -5,9 +5,9 @@ import {
} from "./auth-profiles.js";
import { resolveEnvApiKey } from "./model-auth.js";
import {
buildSyntheticModelDefinition,
SYNTHETIC_BASE_URL,
SYNTHETIC_MODEL_CATALOG,
buildSyntheticModelDefinition,
} from "./synthetic-models.js";
type ModelsConfig = NonNullable<ClawdbotConfig["models"]>;

View File

@@ -483,7 +483,9 @@ describe("models config", () => {
"https://api.synthetic.new/anthropic",
);
expect(parsed.providers.synthetic?.apiKey).toBe("SYNTHETIC_API_KEY");
const ids = parsed.providers.synthetic?.models?.map((model) => model.id);
const ids = parsed.providers.synthetic?.models?.map(
(model) => model.id,
);
expect(ids).toContain("hf:MiniMaxAI/MiniMax-M2.1");
} finally {
if (prevKey === undefined) delete process.env.SYNTHETIC_API_KEY;

View File

@@ -350,8 +350,7 @@ describeLive("live models (profile keys)", () => {
}
if (
ok.text.length === 0 &&
(model.provider === "openrouter" ||
model.provider === "opencode")
(model.provider === "openrouter" || model.provider === "opencode")
) {
skipped.push({
model: id,
@@ -375,7 +374,10 @@ describeLive("live models (profile keys)", () => {
);
continue;
}
if (model.provider === "anthropic" && isAnthropicBillingError(message)) {
if (
model.provider === "anthropic" &&
isAnthropicBillingError(message)
) {
if (attempt + 1 < attemptMax) {
logProgress(
`${progressLabel}: billing issue, retrying with next key`,

View File

@@ -43,10 +43,10 @@ import {
applyMinimaxHostedConfig,
applyMinimaxHostedProviderConfig,
applyMinimaxProviderConfig,
applySyntheticConfig,
applySyntheticProviderConfig,
applyOpencodeZenConfig,
applyOpencodeZenProviderConfig,
applySyntheticConfig,
applySyntheticProviderConfig,
applyZaiConfig,
MINIMAX_HOSTED_MODEL_REF,
SYNTHETIC_DEFAULT_MODEL_REF,

View File

@@ -9,12 +9,12 @@ import {
applyAuthProfileConfig,
applyMinimaxApiConfig,
applyMinimaxApiProviderConfig,
applySyntheticConfig,
applySyntheticProviderConfig,
applyOpencodeZenConfig,
applyOpencodeZenProviderConfig,
applyOpenrouterConfig,
applyOpenrouterProviderConfig,
applySyntheticConfig,
applySyntheticProviderConfig,
OPENROUTER_DEFAULT_MODEL_REF,
SYNTHETIC_DEFAULT_MODEL_ID,
SYNTHETIC_DEFAULT_MODEL_REF,

View File

@@ -3,11 +3,11 @@ import { resolveDefaultAgentDir } from "../agents/agent-scope.js";
import { upsertAuthProfile } from "../agents/auth-profiles.js";
import { OPENCODE_ZEN_DEFAULT_MODEL_REF } from "../agents/opencode-zen-models.js";
import {
buildSyntheticModelDefinition,
SYNTHETIC_BASE_URL,
SYNTHETIC_DEFAULT_MODEL_ID,
SYNTHETIC_DEFAULT_MODEL_REF,
SYNTHETIC_MODEL_CATALOG,
buildSyntheticModelDefinition,
} from "../agents/synthetic-models.js";
import type { ClawdbotConfig } from "../config/config.js";
import type { ModelDefinitionConfig } from "../config/types.js";
@@ -102,7 +102,6 @@ function buildMoonshotModelDefinition(): ModelDefinitionConfig {
};
}
export async function writeOAuthCredentials(
provider: OAuthProvider,
creds: OAuthCredentials,
@@ -368,8 +367,7 @@ export function applySyntheticProviderConfig(
const models = { ...cfg.agents?.defaults?.models };
models[SYNTHETIC_DEFAULT_MODEL_REF] = {
...models[SYNTHETIC_DEFAULT_MODEL_REF],
alias:
models[SYNTHETIC_DEFAULT_MODEL_REF]?.alias ?? "MiniMax M2.1",
alias: models[SYNTHETIC_DEFAULT_MODEL_REF]?.alias ?? "MiniMax M2.1",
};
const providers = { ...cfg.models?.providers };

View File

@@ -10,12 +10,12 @@ import {
discoverModels,
} from "@mariozechner/pi-coding-agent";
import { describe, it } from "vitest";
import { resolveClawdbotAgentDir } from "../agents/agent-paths.js";
import {
type AuthProfileStore,
ensureAuthProfileStore,
saveAuthProfileStore,
} from "../agents/auth-profiles.js";
import { resolveClawdbotAgentDir } from "../agents/agent-paths.js";
import {
collectAnthropicApiKeys,
isAnthropicBillingError,
@@ -712,7 +712,10 @@ async function runGatewayModelSuite(params: GatewayModelSuiteParams) {
logProgress(`${progressLabel}: rate limit, retrying with next key`);
continue;
}
if (model.provider === "anthropic" && isAnthropicBillingError(message)) {
if (
model.provider === "anthropic" &&
isAnthropicBillingError(message)
) {
if (attempt + 1 < attemptMax) {
logProgress(
`${progressLabel}: billing issue, retrying with next key`,