feat(vscode): show dedicated ai& provider settings (#14611)

* feat(vscode): show dedicated ai& provider settings

Selecting ai& in the extension showed the generic OpenAI-compatible form
(base URL, model ID, custom headers, Azure options). Register aiand as a
known provider so it gets the standard API key + model picker form, backed
by the SDK builtin (fixed base URL https://api.aiand.com/v1, catalog models,
default zai-org/glm-5.3).

* chore: drop unused changeset file
This commit is contained in:
Fenil Modi
2026-10-12 22:08:48 +02:00
committed by GitHub
parent 9f003b3a45
commit ff255c08a9
6 changed files with 16 additions and 1 deletions
@@ -57,6 +57,7 @@ describe("parseProviderId", () => {
parseProviderId("xiaomi")
parseProviderId("tencent-tokenhub")
parseProviderId("chutes")
parseProviderId("aiand")
expect(warnSpy).not.toHaveBeenCalled()
})
@@ -74,6 +75,7 @@ describe("isKnownProviderId", () => {
expect(isKnownProviderId(parseProviderId("xiaomi"))).toBe(true)
expect(isKnownProviderId(parseProviderId("tencent-tokenhub"))).toBe(true)
expect(isKnownProviderId(parseProviderId("chutes"))).toBe(true)
expect(isKnownProviderId(parseProviderId("aiand"))).toBe(true)
})
it("returns false for a custom provider id", () => {
@@ -59,6 +59,7 @@ const KNOWN_API_PROVIDERS = {
xiaomi: true,
"tencent-tokenhub": true,
chutes: true,
aiand: true,
"cline-pass": true,
} satisfies Record<ApiProvider, true>
+1
View File
@@ -52,6 +52,7 @@ export type ApiProvider =
| "xiaomi"
| "tencent-tokenhub"
| "chutes"
| "aiand"
export const DEFAULT_API_PROVIDER = "openrouter" as ApiProvider
@@ -4,7 +4,7 @@ import { convertApiConfigurationToProto, convertProtoToApiConfiguration } from "
describe("api configuration provider conversion", () => {
it("round-trips SDK provider ids added after the legacy enum list", () => {
const providers: ApiProvider[] = ["poolside", "v0", "xiaomi", "tencent-tokenhub", "chutes", "zai-coding-plan"]
const providers: ApiProvider[] = ["poolside", "v0", "xiaomi", "tencent-tokenhub", "chutes", "aiand", "zai-coding-plan"]
for (const provider of providers) {
const proto = convertApiConfigurationToProto({
@@ -57,6 +57,7 @@ describe("providerSettingsRegistry", () => {
it("allows migrated simple SDK providers to use the generic fallback", () => {
const migratedProviders = [
["aiand", "ai&", "https://console.aiand.com/"],
["baseten", "Baseten", "https://app.baseten.co/settings/api_keys"],
["cerebras", "Cerebras", "https://cloud.cerebras.ai/"],
["chutes", "Chutes", "https://chutes.ai/app/api"],
@@ -206,6 +207,12 @@ describe("providerSettingsRegistry", () => {
providerId: "zai-coding-plan",
providerName: "Z.AI Coding Plan",
})
expect(getFallbackGenericProviderSettings("aiand")).toEqual({
allowsCustomIds: false,
providerId: "aiand",
providerName: "ai&",
signupUrl: "https://console.aiand.com/",
})
expect(getFallbackGenericProviderSettings("openai")).toBeUndefined()
})
})
@@ -107,6 +107,9 @@ const GENERIC_PROVIDER_PRESENTATION_OVERRIDES: Record<string, GenericProviderPre
chutes: {
signupUrl: "https://chutes.ai/app/api",
},
aiand: {
signupUrl: "https://console.aiand.com/",
},
"zai-coding-plan": {},
}
@@ -169,6 +172,7 @@ const FALLBACK_GENERIC_PROVIDER_NAMES = {
xiaomi: "Xiaomi",
"tencent-tokenhub": "Tencent TokenHub",
chutes: "Chutes",
aiand: "ai&",
"zai-coding-plan": "Z.AI Coding Plan",
} as const