Skip to content

feat: support minimax client #1091

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 17, 2025
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
1 change: 1 addition & 0 deletions Argcfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ _argc_before() {
groq,llama-3.1-8b-instant,https://api.groq.com/openai/v1 \
hunyuan,hunyuan-large,https://api.hunyuan.cloud.tencent.com/v1 \
lingyiwanwu,yi-large,https://api.lingyiwanwu.com/v1 \
minimax,MiniMax-Text-01,https://api.minimax.chat/v1 \
mistral,mistral-small-latest,https://api.mistral.ai/v1 \
moonshot,moonshot-v1-8k,https://api.moonshot.cn/v1 \
openrouter,openai/gpt-4o-mini,https://openrouter.ai/api/v1 \
Expand Down
6 changes: 6 additions & 0 deletions config.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,12 @@ clients:
api_base: https://api.lingyiwanwu.com/v1
api_key: xxx

# See https://platform.minimaxi.com/document/Fast%20access
- type: openai-compatible
name: minimax
api_base: https://api.minimax.chat/v1
api_key: xxx

# See https://deepinfra.com/docs
- type: openai-compatible
name: deepinfra
Expand Down
51 changes: 45 additions & 6 deletions models.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,14 @@
max_input_tokens: 4096

# Links:
# - https://docs.x.ai/docs#models
# - https://docs.x.ai/api/endpoints#chat-completions
# - https://docs.x.ai/docs/models
- platform: xai
models:
- name: grok-2-latest
max_input_tokens: 131072
input_price: 2
output_price: 10
supports_function_calling: true
- name: grok-2-1212
max_input_tokens: 131072
input_price: 2
Expand All @@ -335,7 +339,13 @@
input_price: 5
output_price: 15
supports_function_calling: true
- name: grok-2-vision-1212
- name: grok-2-vision-latest
max_input_tokens: 32768
input_price: 2
output_price: 10
supports_vision: true
supports_function_calling: true
- name: grok-2-vision-1212
max_input_tokens: 32768
input_price: 2
output_price: 10
Expand Down Expand Up @@ -712,7 +722,7 @@
require_max_tokens: true
input_price: 0
output_price: 0
- name: '@cf/meta/llama-3.2-11b-vision-instruct'
- name: '@cf/meta/llama-3.2-11b-vision-instruct'
max_input_tokens: 6144
max_output_tokens: 2048
require_max_tokens: true
Expand Down Expand Up @@ -1023,6 +1033,24 @@
output_price: 0.84
supports_vision: true

# Links:
# - https://platform.minimaxi.com/document/Price
# - https://platform.minimaxi.com/document/ChatCompletion%20v2
- platform: minimax
models:
- name: minimax-text-01
max_input_tokens: 1000192
input_price: 0.14
output_price: 1.12
supports_vision: true
# supports_function_calling: true
- name: abab6.5s-chat
max_input_tokens: 245760
input_price: 0.14
output_price: 0.14
supports_vision: true
# supports_function_calling: true

# Links:
# - https://github.com/marketplace/models
- platform: github
Expand Down Expand Up @@ -1099,6 +1127,8 @@
- name: ai21-jamba-1.5-mini
max_input_tokens: 256000
supports_function_calling: true
- name: phi-4
max_input_tokens: 16384
- name: phi-3.5-moe-instruct
max_input_tokens: 128000
- name: phi-3.5-mini-instruct
Expand Down Expand Up @@ -1452,6 +1482,11 @@
input_price: 0.2
output_price: 0.6
supports_function_calling: true
- name: mistralai/codestral-2501
max_input_tokens: 256000
input_price: 0.3
output_price: 0.9
supports_function_calling: true
- name: mistralai/ministral-8b
max_input_tokens: 128000
input_price: 0.1
Expand Down Expand Up @@ -1558,7 +1593,7 @@
input_price: 5
output_price: 15
supports_function_calling: true
- name: x-ai/grok-2-vision-1212
- name: x-ai/grok-2-vision-1212
max_input_tokens: 32768
input_price: 2
output_price: 10
Expand All @@ -1569,7 +1604,7 @@
input_price: 5
output_price: 15
supports_vision: true
- name: amazon/nova-pro-v1
- name: amazon/nova-pro-v1
max_input_tokens: 300000
max_output_tokens: 5120
input_price: 0.8
Expand All @@ -1586,6 +1621,10 @@
max_output_tokens: 5120
input_price: 0.035
output_price: 0.14
- name: minimax/minimax-01
max_input_tokens: 1000192
input_price: 0.2
output_price: 1.1

# Links
# - https://cloud.siliconflow.cn/models
Expand Down
3 changes: 2 additions & 1 deletion src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ register_client!(
(ernie, "ernie", ErnieConfig, ErnieClient),
);

pub const OPENAI_COMPATIBLE_PLATFORMS: [(&str, &str); 21] = [
pub const OPENAI_COMPATIBLE_PLATFORMS: [(&str, &str); 22] = [
("ai21", "https://api.ai21.com/studio/v1"),
("cloudflare", ""),
("deepinfra", "https://api.deepinfra.com/v1/openai"),
Expand All @@ -45,6 +45,7 @@ pub const OPENAI_COMPATIBLE_PLATFORMS: [(&str, &str); 21] = [
("groq", "https://api.groq.com/openai/v1"),
("hunyuan", "https://api.hunyuan.cloud.tencent.com/v1"),
("lingyiwanwu", "https://api.lingyiwanwu.com/v1"),
("minimax", "https://api.minimax.chat/v1"),
("mistral", "https://api.mistral.ai/v1"),
("moonshot", "https://api.moonshot.cn/v1"),
("openrouter", "https://openrouter.ai/api/v1"),
Expand Down
Loading