From 66ad8a92898068916042c3d3d4ba73f57fb0db75 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Tue, 13 Jan 2026 03:36:32 +0000 Subject: [PATCH] fix: apply lint fixes --- src/agents/models-config.providers.ts | 2 +- src/agents/models-config.test.ts | 4 +++- src/agents/models.profiles.live.test.ts | 8 +++++--- src/commands/auth-choice.ts | 4 ++-- src/commands/onboard-auth.test.ts | 4 ++-- src/commands/onboard-auth.ts | 6 ++---- src/gateway/gateway-models.profiles.live.test.ts | 7 +++++-- 7 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/agents/models-config.providers.ts b/src/agents/models-config.providers.ts index 0d5cb8f05..28aea65e1 100644 --- a/src/agents/models-config.providers.ts +++ b/src/agents/models-config.providers.ts @@ -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; diff --git a/src/agents/models-config.test.ts b/src/agents/models-config.test.ts index e0a16738c..0151c543b 100644 --- a/src/agents/models-config.test.ts +++ b/src/agents/models-config.test.ts @@ -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; diff --git a/src/agents/models.profiles.live.test.ts b/src/agents/models.profiles.live.test.ts index a8cf31903..e991b0818 100644 --- a/src/agents/models.profiles.live.test.ts +++ b/src/agents/models.profiles.live.test.ts @@ -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`, diff --git a/src/commands/auth-choice.ts b/src/commands/auth-choice.ts index 0164609c8..d3f5a65c6 100644 --- a/src/commands/auth-choice.ts +++ b/src/commands/auth-choice.ts @@ -43,10 +43,10 @@ import { applyMinimaxHostedConfig, applyMinimaxHostedProviderConfig, applyMinimaxProviderConfig, - applySyntheticConfig, - applySyntheticProviderConfig, applyOpencodeZenConfig, applyOpencodeZenProviderConfig, + applySyntheticConfig, + applySyntheticProviderConfig, applyZaiConfig, MINIMAX_HOSTED_MODEL_REF, SYNTHETIC_DEFAULT_MODEL_REF, diff --git a/src/commands/onboard-auth.test.ts b/src/commands/onboard-auth.test.ts index 5e4de8e99..ba91697f2 100644 --- a/src/commands/onboard-auth.test.ts +++ b/src/commands/onboard-auth.test.ts @@ -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, diff --git a/src/commands/onboard-auth.ts b/src/commands/onboard-auth.ts index 60dbeedaf..0e593d988 100644 --- a/src/commands/onboard-auth.ts +++ b/src/commands/onboard-auth.ts @@ -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 }; diff --git a/src/gateway/gateway-models.profiles.live.test.ts b/src/gateway/gateway-models.profiles.live.test.ts index 7957e639f..9af3c1b8f 100644 --- a/src/gateway/gateway-models.profiles.live.test.ts +++ b/src/gateway/gateway-models.profiles.live.test.ts @@ -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`,