Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

Commit 1ddc38f

Browse files
committed
fix(firmware): add firmwareApiKey to SECRET_STATE_KEYS to fix onboarding
- Add firmwareApiKey to SECRET_STATE_KEYS array - Ensures checkExistKey() recognizes firmware provider as configured - Fixes issue where onboarding wouldn't complete after entering API key - Add test case for firmware provider validation - Update default model to anthropic/claude-sonnet-4-5-20250929 - Improve UI: move quota display above API key field - Update service URL to docs.firmware.ai
1 parent 98d6575 commit 1ddc38f

4 files changed

Lines changed: 14 additions & 9 deletions

File tree

packages/types/src/global-settings.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ export const SECRET_STATE_KEYS = [
249249
"chutesApiKey",
250250
"litellmApiKey",
251251
"deepInfraApiKey",
252+
"firmwareApiKey",
252253
"codeIndexOpenAiKey",
253254
"codeIndexQdrantApiKey",
254255
"codebaseIndexOpenAiCompatibleApiKey",

src/api/providers/firmware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { RouterProvider } from "./router-provider"
1515
import { getModels } from "./fetchers/modelCache"
1616

1717
const FIRMWARE_BASE_URL = "https://app.firmware.ai/api/v1"
18-
const FIRMWARE_DEFAULT_MODEL_ID = "claude-sonnet-4-5"
18+
const FIRMWARE_DEFAULT_MODEL_ID = "anthropic/claude-sonnet-4-5-20250929"
1919

2020
export class FirmwareHandler extends RouterProvider implements SingleCompletionHandler {
2121
constructor(options: ApiHandlerOptions) {

src/shared/__tests__/checkExistApiConfig.spec.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,12 @@ describe("checkExistKey", () => {
8787
}
8888
expect(checkExistKey(config)).toBe(true)
8989
})
90+
91+
it("should return true for firmware provider with API key", () => {
92+
const config: ProviderSettings = {
93+
apiProvider: "firmware",
94+
firmwareApiKey: "test-firmware-key",
95+
}
96+
expect(checkExistKey(config)).toBe(true)
97+
})
9098
})

webview-ui/src/components/settings/providers/Firmware.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { inputEventTransform } from "../transforms"
1111
import { ModelPicker } from "../ModelPicker"
1212
import { FirmwareQuotaDisplay } from "./FirmwareQuotaDisplay"
1313

14-
const FIRMWARE_DEFAULT_MODEL_ID = "claude-sonnet-4-5"
14+
const FIRMWARE_DEFAULT_MODEL_ID = "anthropic/claude-sonnet-4-5-20250929"
1515

1616
type FirmwareProps = {
1717
apiConfiguration: ProviderSettings
@@ -50,14 +50,10 @@ export const Firmware = ({
5050
return (
5151
<>
5252
<div className="flex flex-col gap-1">
53+
<FirmwareQuotaDisplay />
5354
<div className="flex items-center justify-between">
5455
<label className="block font-medium">{t("settings:providers.apiKey")}</label>
55-
<div className="flex items-center gap-3">
56-
<FirmwareQuotaDisplay />
57-
{/* <VSCodeLink href="https://app.firmware.ai/api-keys">
58-
{t("settings:providers.getApiKey")}
59-
</VSCodeLink> */}
60-
</div>
56+
<div className="flex items-center gap-3"></div>
6157
</div>
6258
<VSCodeTextField
6359
value={apiConfiguration?.firmwareApiKey || ""}
@@ -93,7 +89,7 @@ export const Firmware = ({
9389
models={routerModels?.firmware ?? {}}
9490
modelIdKey="firmwareModelId"
9591
serviceName="Firmware"
96-
serviceUrl="https://app.firmware.ai/models"
92+
serviceUrl="https://docs.firmware.ai/api-reference/models"
9793
organizationAllowList={organizationAllowList}
9894
errorMessage={modelValidationError}
9995
simplifySettings={simplifySettings}

0 commit comments

Comments
 (0)