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
16 changes: 16 additions & 0 deletions src/main/presenter/configPresenter/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,22 @@ export const DEFAULT_PROVIDERS: LLM_PROVIDER_BASE[] = [
}
},

{
id: 'zenmux',
name: 'ZenMux',
apiType: 'zenmux',
apiKey: '',
baseUrl: 'https://zenmux.ai/api/v1/',
enable: false,
websites: {
official: 'https://zenmux.ai/',
apiKey: 'https://zenmux.ai/settings/keys',
docs: 'https://docs.zenmux.ai/api/openai/create-chat-completion.html',
models: 'https://docs.zenmux.ai/api/openai/create-chat-completion.html',
defaultBaseUrl: 'https://zenmux.ai/api/v1/'
}
},
Comment on lines +112 to +126
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify ZenMux URLs are accessible and correct.

The provider configuration looks well-structured. However, please verify that all URLs (official, apiKey, docs, models, defaultBaseUrl) are accessible and point to the correct resources.

Run the following script to check the URL availability:


🏁 Script executed:

#!/bin/bash
# Description: Verify ZenMux URLs are accessible

echo "Checking ZenMux URLs..."
curl -s -o /dev/null -w "Official: %{http_code}\n" https://zenmux.ai/
curl -s -o /dev/null -w "API Keys: %{http_code}\n" https://zenmux.ai/settings/keys
curl -s -o /dev/null -w "API Docs: %{http_code}\n" https://docs.zenmux.ai/api/openai/create-chat-completion.html
curl -s -o /dev/null -w "Base URL: %{http_code}\n" https://zenmux.ai/api/v1/

Length of output: 79


Fix baseUrl endpoint that returns 404 error.

The API endpoint https://zenmux.ai/api/v1/ (used for both baseUrl and defaultBaseUrl) is unreachable and returns a 404 error. While the official website and documentation pages are accessible, the actual API endpoint path appears to be incorrect. Verify the correct ZenMux API endpoint from their official documentation and update the configuration accordingly.

🤖 Prompt for AI Agents
In src/main/presenter/configPresenter/providers.ts around lines 112 to 126, the
configured ZenMux API paths are incorrect and return 404; verify the official
ZenMux API root in their documentation and update both the provider's baseUrl
and websites.defaultBaseUrl to that documented API root (replace the current
'https://zenmux.ai/api/v1/' value with the correct endpoint), ensuring the
provider's baseUrl ends with a trailing slash and keeping websites.apiKey, docs,
and models URLs unchanged.


{
id: 'tokenflux',
name: 'TokenFlux',
Expand Down
5 changes: 5 additions & 0 deletions src/main/presenter/llmProviderPresenter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import { ModelscopeProvider } from './providers/modelscopeProvider'
import { VercelAIGatewayProvider } from './providers/vercelAIGatewayProvider'
import { PoeProvider } from './providers/poeProvider'
import { JiekouProvider } from './providers/jiekouProvider'
import { ZenmuxProvider } from './providers/zenmuxProvider'

// Rate limit configuration interface
interface RateLimitConfig {
Expand Down Expand Up @@ -220,6 +221,8 @@ export class LLMProviderPresenter implements ILlmProviderPresenter {
return new AwsBedrockProvider(provider, this.configPresenter)
case 'jiekou':
return new JiekouProvider(provider, this.configPresenter)
case 'zenmux':
return new ZenmuxProvider(provider, this.configPresenter)
default:
console.log(
`No specific provider found for id: ${provider.id}, falling back to apiType: ${provider.apiType}`
Expand Down Expand Up @@ -276,6 +279,8 @@ export class LLMProviderPresenter implements ILlmProviderPresenter {
return new AwsBedrockProvider(provider, this.configPresenter)
case 'jiekou':
return new JiekouProvider(provider, this.configPresenter)
case 'zenmux':
return new ZenmuxProvider(provider, this.configPresenter)
default:
console.warn(`Unknown provider type: ${provider.apiType} for provider id: ${provider.id}`)
return undefined
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { IConfigPresenter, LLM_PROVIDER, MODEL_META } from '@shared/presenter'
import { OpenAICompatibleProvider } from './openAICompatibleProvider'

export class ZenmuxProvider extends OpenAICompatibleProvider {
constructor(provider: LLM_PROVIDER, configPresenter: IConfigPresenter) {
super(provider, configPresenter)
}

protected async fetchOpenAIModels(options?: { timeout: number }): Promise<MODEL_META[]> {
const models = await super.fetchOpenAIModels(options)
return models.map((model) => ({
...model,
group: 'ZenMux'
}))
}
}
5 changes: 5 additions & 0 deletions src/renderer/src/assets/llm-icons/zenmux-color.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/renderer/src/components/icons/ModelIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ import _302aiIcon from '@/assets/llm-icons/302ai.svg?url'
import modelscopeColorIcon from '@/assets/llm-icons/modelscope-color.svg?url'
import awsBedrockIcon from '@/assets/llm-icons/aws-bedrock.svg?url'
import jiekouColorIcon from '@/assets/llm-icons/jiekou-color.svg?url'
import zenmuxColorIcon from '@/assets/llm-icons/zenmux-color.svg?url'

// 导入所有图标
const icons = {
Expand Down Expand Up @@ -135,6 +136,7 @@ const icons = {
meta: metaColorIcon,
'aws-bedrock': awsBedrockIcon,
jiekou: jiekouColorIcon,
zenmux: zenmuxColorIcon,
default: defaultIcon
}

Expand Down