Skip to content

Feature/add mimo provider#1987

Merged
alexhoshina merged 3 commits intosipeed:mainfrom
SiYue-ZO:feature/add-mimo-provider
Mar 25, 2026
Merged

Feature/add mimo provider#1987
alexhoshina merged 3 commits intosipeed:mainfrom
SiYue-ZO:feature/add-mimo-provider

Conversation

@SiYue-ZO
Copy link
Contributor

@SiYue-ZO SiYue-ZO commented Mar 25, 2026

📝 Description

This PR adds support for Xiaomi MiMo model provider to PicoClaw.

MiMo is Xiaomi's AI assistant model that provides an OpenAI-compatible API. This integration allows users to easily configure and use MiMo models within PicoClaw.

Changes included in this PR:

Backend:

  • Add mimo protocol prefix support in factory_provider.go

  • Add default API base URL: https://api.xiaomimimo.com/v1
    Frontend:

  • Add MiMo label to provider-label.ts

  • Add MiMo to PROVIDER_PRIORITY in models-page.tsx for proper sorting

  • Add MiMo domain ( xiaomi.com ) to provider-icon.tsx for icon display
    Documentation:

  • Update provider tables in both English ( docs/providers.md ) and Chinese ( docs/zh/providers.md ) documentation
    Tests:

  • Add unit tests for MiMo provider creation and default API base URL

Usage:

Users can now use MiMo by adding the following configuration:

{
  "model_name": "mimo",
  "model": "mimo/mimo-v2-pro",
  "api_key": "your-mimo-api-key"
}

🗣️ Type of Change

🗣️ Type of Change

  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 📖 Documentation update
  • ⚡ Code refactoring (no functional changes, no api changes)

🤖 AI Code Generation

  • 🤖 Fully AI-generated (100% AI, 0% Human)
  • 🛠️ Mostly AI-generated (AI draft, Human verified/modified)
  • 👨‍💻 Mostly Human-written (Human lead, AI assisted or none)

🔗 Related Issue

Adds Xiaomi MiMo provider support

📚 Technical Context

API Compatibility: MiMo API is compatible with OpenAI API format, making it easy to integrate with the existing HTTPProvider infrastructure.

Authentication: MiMo uses api-key header for authentication (same as standard OpenAI-compatible APIs).

Reference URL: https://platform.xiaomimimo.com/#/docs/quick-start/first-api-call

🧪 Test Environment

  • Hardware: PC
  • OS: Linux
  • Model/Provider: Xiaomi MiMo (mimo-v2-pro)
  • Channels: N/A

📋 Checklist

  • Code follows the project's style guidelines
  • Documentation has been updated

- Add 'mimo' protocol prefix support in factory_provider.go
- Add default API base URL for MiMo: https://api.xiaomimimo.com/v1
- Update provider-label.ts to include Xiaomi MiMo label
- Add MiMo to provider tables in both English and Chinese documentation
- Add comprehensive unit tests for MiMo provider

MiMo API is compatible with OpenAI API format, making it easy to integrate
with the existing HTTPProvider infrastructure.

Users can now use MiMo by configuring:
{
  "model_name": "mimo",
  "model": "mimo/mimo-v2-pro",
  "api_key": "your-mimo-api-key"
}
@yinwm
Copy link
Collaborator

yinwm commented Mar 25, 2026

🔒 Security Issue: Sensitive Files Exposed

This PR includes files that should not be committed to the repository:

Files to Remove

File Issue
Contains exposed token ()
520-line local config file with internal configuration details

Recommended Actions

  1. Remove these files from the PR:

    git rm .security.yml onboard
    git commit --amend
    git push -f
  2. Add to .gitignore:

    .security.yml
    onboard
    
  3. Rotate the exposed token if it is still valid.


Note on Core Changes

The actual MiMo provider implementation looks correct - this is purely about the sensitive files that shouldn't be in the repo.

@sipeed-bot sipeed-bot bot added type: enhancement New feature or request domain: provider go Pull requests that update go code labels Mar 25, 2026
@SiYue-ZO
Copy link
Contributor Author

sorry, I will fix it

@SiYue-ZO SiYue-ZO force-pushed the feature/add-mimo-provider branch from 6b78b86 to e1ea00e Compare March 25, 2026 10:59
@SiYue-ZO
Copy link
Contributor Author

I have fix and git commit -m "Add .security.yml and onboard to .gitignore"

@alexhoshina
Copy link
Collaborator

I suggest using .git/info/exclude to manage your local Git exclusions. It can replace .gitignore and won't be shared.

@SiYue-ZO
Copy link
Contributor Author

I suggest using .git/info/exclude to manage your local Git exclusions. It can replace .gitignore and won't be shared.

regarding the .gitignore change, I’d like to clarify my reasoning.

These files are generated locally when running ./build/picoclaw-launcher onboard, and they may contain environment-specific or sensitive information. Since they are recreated automatically during build/runtime, they don’t need to be tracked in the repository.

If we don’t add them to .gitignore, they will keep showing up as untracked files after each build, which increases the risk of accidentally committing them.

Adding them to .gitignore is mainly to prevent accidental commits of sensitive or machine-specific data, and it won’t affect the build or runtime behavior of the project.

🤔

@alexhoshina
Copy link
Collaborator

alexhoshina commented Mar 25, 2026

I suggest using .git/info/exclude to manage your local Git exclusions. It can replace .gitignore and won't be shared.

regarding the .gitignore change, I’d like to clarify my reasoning.

These files are generated locally when running ./build/picoclaw-launcher onboard, and they may contain environment-specific or sensitive information. Since they are recreated automatically during build/runtime, they don’t need to be tracked in the repository.

If we don’t add them to .gitignore, they will keep showing up as untracked files after each build, which increases the risk of accidentally committing them.

Adding them to .gitignore is mainly to prevent accidental commits of sensitive or machine-specific data, and it won’t affect the build or runtime behavior of the project.

🤔

你好像是中国开发者,我直接用中文吧。
我明白 .gitignore 修改的理由, 至少目前看来这是我第一次看到有人提交的内容携带onboard产生的文件。所以我认为这个排除配置是不需要进行共享的。
对于不需要共享的排除项我更推荐使用.git/info/exclude,这个文件的作用与 .gitignore 相同,唯一的区别是.git/info/exclude不会被git跟踪,所以不会共享给仓库的其他开发者。
🫡这个事情不会阻塞合并,只是作为一个tips。使用 .gitignore 也可以避免以后有开发者对这些私有文件进行跟踪。

@alexhoshina alexhoshina merged commit bb2eddc into sipeed:main Mar 25, 2026
4 checks passed
@SiYue-ZO
Copy link
Contributor Author

I suggest using .git/info/exclude to manage your local Git exclusions. It can replace .gitignore and won't be shared.

regarding the .gitignore change, I’d like to clarify my reasoning.
These files are generated locally when running ./build/picoclaw-launcher onboard, and they may contain environment-specific or sensitive information. Since they are recreated automatically during build/runtime, they don’t need to be tracked in the repository.
If we don’t add them to .gitignore, they will keep showing up as untracked files after each build, which increases the risk of accidentally committing them.
Adding them to .gitignore is mainly to prevent accidental commits of sensitive or machine-specific data, and it won’t affect the build or runtime behavior of the project.
🤔

你好像是中国开发者,我直接用中文吧。 我明白 .gitignore 修改的理由, 至少目前看来这是我第一次看到有人提交的内容携带onboard产生的文件。所以我认为这个排除配置是不需要进行共享的。 对于不需要共享的排除项我更推荐使用.git/info/exclude,这个文件的作用与 .gitignore 相同,唯一的区别是.git/info/exclude不会被git跟踪,所以不会共享给仓库的其他开发者。 🫡这个事情不会阻塞合并,只是作为一个tips。使用**.gitignore**也可以避免以后有开发者对这些私有文件进行跟踪。

好的,我理解了,我的git使用还不熟练,非常感谢你的回复和建议!最初我也很疑惑为什么onboard会生成在项目目录下,我会尝试解决解决这个问题。

@alexhoshina
Copy link
Collaborator

在我目前的开发流程中 我更习惯直接使用make install,然后直接使用picoclaw onboard或者启动网关,这样可以避免在仓库下产生相关的配置文件。

samueltuyizere added a commit to samueltuyizere/picoclaw that referenced this pull request Mar 25, 2026
* update security migration documents

* feat(config): add command pattern detection tool in exec settings (sipeed#1971)

* Add command pattern testing endpoint and UI tool

Adds a new API endpoint `/api/config/test-command-patterns` that tests a
command against configured whitelist and blacklist patterns, along with
a frontend UI component to interactively test patterns.

* Only process deny patterns when enableDenyPatterns is true

* feat(models): add extra_body config field in model add/edit UI (sipeed#1969)

* Add extraBody field to model configuration forms

This adds a new field allowing users to specify additional JSON fields
to inject into the request body when configuring models.

* Handle ExtraBody clearing when frontend sends empty object

The backend now interprets an empty object sent from the frontend as a
signal to clear the ExtraBody field, while nil/undefined preserves the
existing value. Frontend changed to send {} instead of undefined when
the field is empty.

* refactor(web): clean up systray platform build files

Separate embedded tray icons into platform-specific files, rename the
no-cgo systray stub for consistency, and add the app version to the
launcher startup log.

* fix(agent): suppress heartbeat tool feedback (sipeed#1937)

* fix(lint): remove CGO_ENABLED=0 for lint and fix (sipeed#1989)

* fix(lint): remove CGO_ENABLED=0 for lint and fix

* fix makefile

* config: add baidu_search example to config.example.json (sipeed#1990)

Add Baidu Qianfan AI Search configuration block after glm_search,
matching the BaiduSearchConfig struct defaults (enabled: false,
max_results: 10).

Co-authored-by: BeaconCat <BeaconCat@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* Fix security config precedence during migration (sipeed#1984)

* Fix security config precedence during migration

* add doc

* fix ci

* add baidu search

* feat(web): add WeCom QR binding flow to channel settings (sipeed#1994)

- add backend WeCom QR flow endpoints and in-memory flow state management
- add frontend WeCom binding UI with QR polling and channel enable toggle
- update channel config behavior and i18n strings for WeCom and WeChat
- apply minor formatting cleanup in model-related components

* chore(tui): add build target for picoclaw-launcher TUI and create README for TUI launcher (sipeed#1995)

* fix(build): disable Matrix gateway import on freebsd/arm

Exclude the Matrix gateway shim from freebsd/arm builds because
modernc.org/libc currently fails to compile on that target.
Document the upstream 32-bit FreeBSD codegen mismatch as well.

* fix(release): ignore nightly tags in goreleaser changelog (sipeed#1999)

GoReleaser was picking nightly tags as the "previous tag" when
generating changelogs, causing release changelogs to be incomplete.
Add git.ignore_tags to skip nightly tags.

* feat(tools): add exec tool enhancement with background execution and PTY support (sipeed#1752)

- Unified exec tool with actions: run/list/poll/read/write/send-keys/kill
- PTY support using creack/pty library
- Process session management with background execution
- Process group kill for cleaning up child processes
- Session cleanup: 30-minute TTL for old sessions
- Output buffer: 100MB limit with truncation

Actions:
- run: execute command (sync or background)
- list: list all sessions
- poll: check session status
- read: read session output
- write: send input to session stdin
- send-keys: send special keys (up, down, ctrl-c, enter, etc.)
- kill: terminate session

Tests:
- PTY: allowed commands, write/read, poll, kill, process group kill
- Non-PTY: background execution, list, read, write, poll, kill, process group kill
- Session management: add/get/remove/list/cleanup

* docs: update WeChat community QR code (sipeed#2003)

Co-authored-by: BeaconCat <BeaconCat@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* feat(logger): add PICOCLAW_LOG_FILE env var for file-only logging

* Feature/add mimo provider (sipeed#1987)

* feat: add Xiaomi MiMo provider support

- Add 'mimo' protocol prefix support in factory_provider.go
- Add default API base URL for MiMo: https://api.xiaomimimo.com/v1
- Update provider-label.ts to include Xiaomi MiMo label
- Add MiMo to provider tables in both English and Chinese documentation
- Add comprehensive unit tests for MiMo provider

MiMo API is compatible with OpenAI API format, making it easy to integrate
with the existing HTTPProvider infrastructure.

Users can now use MiMo by configuring:
{
  "model_name": "mimo",
  "model": "mimo/mimo-v2-pro",
  "api_key": "your-mimo-api-key"
}

* hassas dosyaları kaldırma

* Add .security.yml and onboard to .gitignore

* build(deps): upgrade pty and reorganize sqlite dependencies (sipeed#2012)

- Upgrade github.com/creack/pty from v1.1.9 to v1.1.24
- Move github.com/mattn/go-sqlite3 to indirect dependency
- Move rsc.io/qr from indirect to direct dependency

* feat(channels): support multi-message sending via split marker (sipeed#2008)

* Add multi-message sending via split marker

* Add marker and length split integration tests

Tests that SplitByMarker and SplitMessage work together correctly, and
that code block boundaries are preserved during marker splitting.

* Simplify message chunking logic in channel worker

Extract splitByLength helper function and remove goto-based control
flow.
The logic now flows more naturally - try marker splitting first, then
fall
back to length-based splitting.

* Update multi-message output instructions in agent context

* Add split_on_marker to config defaults

* Add split_on_marker config option

* Rename 'Multi-Message Sending' setting to 'Chatty Mode'

* Add SplitOnMarker config option

---------

Co-authored-by: Cytown <cytown@gmail.com>
Co-authored-by: 柚子 <40852301+uiYzzi@users.noreply.github.com>
Co-authored-by: wenjie <meetwenjie@gmail.com>
Co-authored-by: daming大铭 <yinwm@outlook.com>
Co-authored-by: xiwuqi <64734786+xiwuqi@users.noreply.github.com>
Co-authored-by: taorye <taorye@outlook.com>
Co-authored-by: Luo Peng <luopeng.he@gmail.com>
Co-authored-by: BeaconCat <111232138+BeaconCat@users.noreply.github.com>
Co-authored-by: BeaconCat <BeaconCat@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: lxowalle <83055338+lxowalle@users.noreply.github.com>
Co-authored-by: Guoguo <16666742+imguoguo@users.noreply.github.com>
Co-authored-by: Liu Yuan <namei.unix@gmail.com>
Co-authored-by: 肆月 <2835601846@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: provider go Pull requests that update go code type: enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants