Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/main/provider/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,20 @@ const PROVIDER_DEFAULTS: LLM_PROVIDER_BASE[] = [
models: 'https://xxapi.ai/pricing'
}
},
{
id: 'llmbuzz',
name: 'llm.buzz',
apiType: 'openai-completions',
apiKey: '',
baseUrl: 'https://api.llm.buzz/api/v1',
enable: false,
websites: {
official: 'https://llm.buzz/',
apiKey: 'https://app.llm.buzz',
docs: 'https://llm.buzz',
models: 'https://api.llm.buzz/api/v1/models'
}
},
{
id: 'apimodels',
name: 'apimodels.app',
Expand Down
8 changes: 8 additions & 0 deletions src/main/provider/providerRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,14 @@ const PROVIDER_ID_REGISTRY = new Map<string, AiSdkProviderDefinition>([
embeddingStrategy: 'none'
})
],
[
'llmbuzz',
createDefinition({
...OPENAI_BASE,
credentialStrategy: 'api-key',
embeddingStrategy: 'none'
})
],
[
'apimodels',
createDefinition({
Expand Down
1 change: 1 addition & 0 deletions src/renderer/src/assets/llm-icons/llmbuzz.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/renderer/src/components/icons/modelIconRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ import futureinfraIcon from '@/assets/llm-icons/futureinfra.svg?url'
import atmorouterIcon from '@/assets/llm-icons/atmorouter.svg?url'
import yapiIcon from '@/assets/llm-icons/yapi.svg?url'
import xxapiIcon from '@/assets/llm-icons/xxapi.svg?url'
import llmbuzzIcon from '@/assets/llm-icons/llmbuzz.svg?url'
import apimodelsIcon from '@/assets/llm-icons/apimodels.png?url'
import anonrouterIcon from '@/assets/llm-icons/anonrouter.svg?url'
import typesafeIcon from '@/assets/llm-icons/typesafe.png?url'
Expand Down Expand Up @@ -160,6 +161,7 @@ export const modelIcons = {
atmorouter: atmorouterIcon,
yapi: yapiIcon,
xxapi: xxapiIcon,
llmbuzz: llmbuzzIcon,
apimodels: apimodelsIcon,
zeabur: zeaburColorIcon,
zeroone: zerooneColorIcon,
Expand Down Expand Up @@ -293,6 +295,7 @@ const monoIconUrls = new Set<string>([
runcrateIcon,
cloudgpuIcon,
xxapiIcon,
llmbuzzIcon,
demonrouteColorIcon,
githubColorIcon,
qiniuIcon,
Expand Down
19 changes: 19 additions & 0 deletions test/main/provider/basicApiKeyProviders.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1109,6 +1109,25 @@ describe('basic API-key provider registrations', () => {
})
})

it('resolves llm.buzz through authenticated OpenAI-compatible model discovery', () => {
expect(
resolveAiSdkProviderDefinition(
createProvider({
id: 'llmbuzz',
name: 'llm.buzz',
baseUrl: 'https://api.llm.buzz/api/v1'
})
)
).toMatchObject({
runtimeKind: 'openai-compatible',
modelSource: 'openai',
checkStrategy: 'fetch-models',
credentialStrategy: 'api-key',
routeStrategy: 'none',
embeddingStrategy: 'none'
})
})

it('resolves API Route through authenticated OpenAI-compatible model discovery', () => {
expect(
resolveAiSdkProviderDefinition(
Expand Down
19 changes: 19 additions & 0 deletions test/main/provider/defaultProviders.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,25 @@ describe('DEFAULT_PROVIDERS', () => {
)
})

it('includes llm.buzz as a disabled built-in OpenAI-compatible provider', () => {
expect(DEFAULT_PROVIDERS).toContainEqual(
expect.objectContaining({
id: 'llmbuzz',
name: 'llm.buzz',
apiType: 'openai-completions',
baseUrl: 'https://api.llm.buzz/api/v1',
enable: false,
websites: expect.objectContaining({
official: 'https://llm.buzz/',
apiKey: 'https://app.llm.buzz',
docs: 'https://llm.buzz',
models: 'https://api.llm.buzz/api/v1/models',
defaultBaseUrl: 'https://api.llm.buzz/api/v1'
})
})
)
})

it('includes apimodels.app as a disabled built-in OpenAI-compatible provider', () => {
expect(DEFAULT_PROVIDERS).toContainEqual(
expect.objectContaining({
Expand Down