From b8d9ded7d3c769ee3bc552a410ca41397b0816a5 Mon Sep 17 00:00:00 2001 From: Huang Qi Date: Fri, 19 Dec 2025 11:45:04 +0800 Subject: [PATCH] feat: add xiaomi provider with mimo-v2-flash model Integrate Xiaomi AI services into the models.dev ecosystem by adding support for their MiMo-V2-Flash model through OpenAI-compatible API. * Add xiaomi provider configuration with api.xiaomimimo.com endpoint * Configure environment variable XIAOMI_API_KEY for authentication * Add mimo-v2-flash model with 256k context window and reasoning support * Set pricing at /usr/bin/zsh.07 input / /usr/bin/zsh.21 output per 1M tokens * Enable tool calling and interleaved reasoning capabilities * Configure as open weights model for transparency This addition follows the existing provider pattern and maintains compatibility with the OpenAI SDK through @ai-sdk/openai-compatible. --- providers/xiaomi/logo.svg | 4 ++++ providers/xiaomi/models/mimo-v2-flash.toml | 25 ++++++++++++++++++++++ providers/xiaomi/provider.toml | 5 +++++ 3 files changed, 34 insertions(+) create mode 100644 providers/xiaomi/logo.svg create mode 100644 providers/xiaomi/models/mimo-v2-flash.toml create mode 100644 providers/xiaomi/provider.toml diff --git a/providers/xiaomi/logo.svg b/providers/xiaomi/logo.svg new file mode 100644 index 00000000..890c79da --- /dev/null +++ b/providers/xiaomi/logo.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/providers/xiaomi/models/mimo-v2-flash.toml b/providers/xiaomi/models/mimo-v2-flash.toml new file mode 100644 index 00000000..b53932bd --- /dev/null +++ b/providers/xiaomi/models/mimo-v2-flash.toml @@ -0,0 +1,25 @@ +name = "MiMo-V2-Flash" +family = "mimo-v2-flash" +release_date = "2025-12-17" +last_updated = "2025-12-17" +attachment = false +reasoning = true +temperature = true +knowledge = "2024-12-01" +tool_call = true +open_weights = true + +[cost] +input = 0.07 +output = 0.21 + +[limit] +context = 256_000 +output = 32_000 + +[modalities] +input = ["text"] +output = ["text"] + +[interleaved] +field = "reasoning_content" diff --git a/providers/xiaomi/provider.toml b/providers/xiaomi/provider.toml new file mode 100644 index 00000000..853161e7 --- /dev/null +++ b/providers/xiaomi/provider.toml @@ -0,0 +1,5 @@ +name = "Xiaomi" +env = ["XIAOMI_API_KEY"] +npm = "@ai-sdk/openai-compatible" +api = "https://api.xiaomimimo.com/v1" +doc = "https://platform.xiaomimimo.com/#/docs"