Skip to content

feat: update mllm-cli and android build tasks#605

Merged
chenghuaWang merged 3 commits intoUbiquitousLearning:mainfrom
yuerqiqi:my-feature-dev
Jan 14, 2026
Merged

feat: update mllm-cli and android build tasks#605
chenghuaWang merged 3 commits intoUbiquitousLearning:mainfrom
yuerqiqi:my-feature-dev

Conversation

@yuerqiqi
Copy link
Contributor

@yuerqiqi yuerqiqi commented Jan 14, 2026

Description

This PR updates the mllm-cli logic and Android build configurations to fix build issues and improve compatibility.

Changes

  • Updated mllm-cli command logic in main.go and c.go.
  • Refactored go.mod and go.sum dependencies.
  • Modified Android build tasks (build_android_mllm_client.yaml & server.yaml) for better execution flow.

Motivation

To support the latest build environment and fix issues encountered during the Android compilation process.

Summary by CodeRabbit

  • Documentation
    • Expanded supported LLMs list; rewrote Build Configuration Guide to use dynamic paths and simplified, generalized Android deployment and testing instructions.
  • Dependencies
    • Upgraded Go toolchain; added google/uuid and cleaned up dependency declarations.
  • Chores
    • Streamlined Android build tasks and environment setup for improved portability and clearer build outputs.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 14, 2026

📝 Walkthrough

Walkthrough

Updates: documentation and Android build tasks now use dynamic paths ($(pwd)); Go toolchain and dependencies updated; Cgo header changed to mllm/c_api/Runtime.h; StartService call argument adjusted from 4 to 1; docs reorganized for streamlined build/deploy instructions.

Changes

Cohort / File(s) Summary
Build tasks
tasks/build_android_mllm_client.yaml, tasks/build_android_mllm_server.yaml
Replaced hardcoded include/lib paths with dynamic $(pwd) references; updated CGO_LDFLAGS/CGO_CFLAGS to include -lMllmSdkC -lMllmRT -lMllmCPUBackend -llog and extra include dir; removed verbose step echoes; retained cross-compile env vars.
Go toolchain & deps
mllm-cli/go.mod
Bumped Go toolchain entries (adds go1.23.0 and go1.24.11), promoted several indirect deps to explicit requires, added github.com/google/uuid v1.6.0, and reorganized formatting.
Go source changes
mllm-cli/mllm/c.go, mllm-cli/cmd/mllm-server/main.go
Swapped C header include from <mllm/mllm-c.h> to "mllm/c_api/Runtime.h" in cgo bridge; changed StartService invocation argument from 4 to 1.
Documentation
docs/service/mllm_cli.rst
Reworked build/config guide: generalized prerequisites, replaced server-specific hardcoded paths with portable guidance, restructured steps (compile C++ core, build Go server/client, deploy), and updated port-forwarding/Chatbox notes.

Sequence Diagram(s)

(omitted — changes are configuration, dependency, and small API-call argument adjustments; no new multi-component control-flow warrants a sequence diagram)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • xumengwei
  • liang1232018
  • yirongjie
  • chenghuaWang
  • oreomaker

Poem

🐰 Paths now bend where hardcoded once stood fast,
$(pwd) leads the way, a nimble path at last.
Runtime.h greets the bridge with a soft knock,
StartService shifts — a tiny, steady clock.
Hop on, build logs — into spring we hop! 🥕✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'feat: update mllm-cli and android build tasks' accurately captures the main changes across multiple components including mllm-cli logic, Go module dependencies, and Android build configurations.
Description check ✅ Passed The PR description provides clear sections covering Description, Changes, and Motivation, addressing the main updates to mllm-cli logic, dependencies, and Android build tasks with specific file names and objectives.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@mllm-cli/mllm/c.go`:
- Line 7: Remove the trailing whitespace at the end of the cgo CFLAGS directive
by changing the line that currently reads "#cgo CFLAGS: -std=c11 " to "#cgo
CFLAGS: -std=c11" so it no longer ends with a space; this fixes the
trailing-space lint without changing behavior.
🧹 Nitpick comments (7)
tasks/build_android_mllm_server.yaml (2)

12-13: Mixed use of dynamic and hardcoded paths.

The CGO flags now use $(pwd) for dynamic path resolution, which improves portability. However, CGO_CFLAGS still includes a hardcoded path -I/tmp/mllm_build. Consider:

  1. Using a dynamic path or environment variable for the temp build directory.
  2. Documenting that /tmp/mllm_build must exist before running this task.
Suggested improvement
-      export CGO_CFLAGS="-I$(pwd) -I/tmp/mllm_build"
+      export MLLM_BUILD_DIR="${MLLM_BUILD_DIR:-/tmp/mllm_build}"
+      export CGO_CFLAGS="-I$(pwd) -I$MLLM_BUILD_DIR"

8-10: Hardcoded NDK path may limit portability.

ANDROID_NDK_HOME is hardcoded to /opt/ndk/android-ndk-r28b. Consider making this configurable via an environment variable to support different CI environments or developer machines.

Suggested improvement
-      export ANDROID_NDK_HOME=/opt/ndk/android-ndk-r28b
+      export ANDROID_NDK_HOME="${ANDROID_NDK_HOME:-/opt/ndk/android-ndk-r28b}"
tasks/build_android_mllm_client.yaml (1)

9-11: Same hardcoded paths as server build.

Similar to the server YAML, the NDK path and temp build directory are hardcoded. If you update the server build to use environment variable fallbacks, apply the same pattern here for consistency.

docs/service/mllm_cli.rst (4)

11-11: Use standard English separator instead of Chinese enumeration mark.

The Chinese enumeration mark (、) between model names is inconsistent with English documentation standards. Consider using a comma or bullet points for clarity.

📝 Suggested alternatives

Option 1 (comma separator):

-* **LLM**: ``mllmTeam/Qwen3-0.6B-w4a32kai、mllmTeam/Qwen3-4B-w4a8-i8mm-kai``
+* **LLM**: ``mllmTeam/Qwen3-0.6B-w4a32kai``, ``mllmTeam/Qwen3-4B-w4a8-i8mm-kai``

Option 2 (bullet points for better readability):

-* **LLM**: ``mllmTeam/Qwen3-0.6B-w4a32kai、mllmTeam/Qwen3-4B-w4a8-i8mm-kai``
+* **LLM**: 
+    * ``mllmTeam/Qwen3-0.6B-w4a32kai``
+    * ``mllmTeam/Qwen3-4B-w4a8-i8mm-kai``

139-152: Consider mentioning both build yaml files for completeness.

The Build Configuration Guide mentions checking variables in build_android_mllm_server.yaml, but users compiling the client (Step 3) would benefit from knowing that build_android_mllm_client.yaml has similar configuration requirements (ANDROID_NDK_HOME, GOPROXY).

📝 Suggested enhancement
-Open `tasks/build_android_mllm_server.yaml` and check the following variables:
+Open `tasks/build_android_mllm_server.yaml` (and `build_android_mllm_client.yaml` if building the client) and check the following variables:

159-164: Consider specifying Go version requirements.

Based on the PR's Go toolchain updates (1.23.0 and 1.24.11 mentioned in the summary), documenting the minimum or recommended Go version would help users avoid version-related build issues.

📝 Suggested enhancement
 Prerequisites
 ~~~~~~~~~~~~~
 
-* Android NDK and Go compiler installed and configured.
+* Android NDK (r28b or compatible) and Go compiler (1.23.0 or later) installed and configured.
 * An Android device connected via `adb`.

170-172: Enhance configuration guidance consistency.

Step 1 mentions configuring tasks/build_android.yaml but doesn't provide specific variable details, unlike the Build Configuration Guide (lines 139-152) which details ANDROID_NDK_HOME and GOPROXY for the server/client builds. Consider either:

  1. Adding build_android.yaml configuration details to the Build Configuration Guide section for centralized guidance, or
  2. Providing inline details here about which variables to check

This would help users understand all configuration requirements upfront.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0eb79bb and c9c99a7.

⛔ Files ignored due to path filters (1)
  • mllm-cli/go.sum is excluded by !**/*.sum
📒 Files selected for processing (6)
  • docs/service/mllm_cli.rst
  • mllm-cli/cmd/mllm-server/main.go
  • mllm-cli/go.mod
  • mllm-cli/mllm/c.go
  • tasks/build_android_mllm_client.yaml
  • tasks/build_android_mllm_server.yaml
🧰 Additional context used
📓 Path-based instructions (1)
{mllm,mllm-cli,pymllm}/**/*

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

{mllm,mllm-cli,pymllm}/**/*: Files must not contain C0 control codes 0x00–0x08, 0x0B–0x0C, 0x0E–0x1F, C1 control codes 0x7F–0x9F, or DEL 0x7F. Horizontal tab (0x09) and line feed (0x0A) are explicitly allowed.
All files must be encoded in UTF-8 without BOM.
Any violation of character set (Rule 1) or encoding (Rule 2) requirements must cause the review to fail.
No line may end with trailing whitespace.
Use Unix line endings (LF).
File and directory names must consist only of printable Unicode characters, excluding C0 control codes 0x00–0x08, 0x0B–0x0C, 0x0E–0x1F, C1 control codes 0x7F–0x9F, and DEL 0x7F.
Only use acceptable file extensions: .c, .cc, .cpp, .cxx, .h, .hh, .hpp, .py, .pyi, .sh, .txt, .md, .yml, .yaml, .json, .toml.
Optional license headers, if present, must comply with character set rules (no C0/C1 control codes except tab and line feed).

Files:

  • mllm-cli/cmd/mllm-server/main.go
  • mllm-cli/mllm/c.go
  • mllm-cli/go.mod
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
Repo: UbiquitousLearning/mllm PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-25T07:26:06.575Z
Learning: Applies to {mllm,mllm-cli,pymllm}/**/*.{c,cc,cpp,cxx,h,hh,hpp,py,pyi,sh} : Encourage consistent coding style and patterns with the existing codebase.
📚 Learning: 2025-11-25T07:26:06.575Z
Learnt from: CR
Repo: UbiquitousLearning/mllm PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-25T07:26:06.575Z
Learning: Applies to {mllm,mllm-cli,pymllm}/**/*.{c,cc,cpp,cxx,h,hh,hpp,py,pyi,sh} : Encourage consistent coding style and patterns with the existing codebase.

Applied to files:

  • docs/service/mllm_cli.rst
📚 Learning: 2025-11-25T07:26:06.575Z
Learnt from: CR
Repo: UbiquitousLearning/mllm PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-25T07:26:06.575Z
Learning: Applies to {mllm,mllm-cli,pymllm}/**/*.{c,cc,cpp,cxx,h,hh,hpp,py,pyi,sh} : Ensure code is portable across supported platforms (e.g., Linux, Windows) unless explicitly platform-specific.

Applied to files:

  • docs/service/mllm_cli.rst
🧬 Code graph analysis (1)
mllm-cli/cmd/mllm-server/main.go (1)
mllm-cli/mllm/c.go (1)
  • StartService (45-48)
🔇 Additional comments (5)
mllm-cli/cmd/mllm-server/main.go (1)

32-32: Worker thread count reduced from 4 to 1.

The StartService call now uses 1 worker thread instead of 4. This significantly reduces the service's ability to handle concurrent requests. Please confirm this is intentional:

  • Is this change specific to resource-constrained Android deployments?
  • Could this impact throughput for multi-model serving scenarios (Qwen3 + DeepSeek-OCR)?
  • Consider making this configurable via a command-line flag (e.g., --worker-threads) for flexibility.
tasks/build_android_mllm_client.yaml (1)

4-21: LGTM with minor consistency note.

The streamlined build configuration using dynamic $(pwd) paths aligns well with the server build changes. The overall structure is clean and maintainable.

Note: This file uses 7-space indentation while build_android_mllm_server.yaml uses 6-space indentation. Consider aligning indentation across both YAML files for consistency, though this is a minor style concern.

mllm-cli/mllm/c.go (1)

10-10: Header path change verified successfully.

The new header mllm/c_api/Runtime.h exists in the expected location, and no references to the old mllm-c.h header remain in the codebase. The include path migration is complete.

mllm-cli/go.mod (2)

12-26: Dependencies promoted from indirect to direct are correctly marked.

All four packages (bubbletea, lipgloss, uuid, termenv) are directly imported in the codebase (mllm-cli/tui/modelhub.go, mllm-cli/tui/welcome.go, mllm-cli/pkg/server/handlers.go), confirming that removing the // indirect markers is appropriate and will not be reverted by go mod tidy.


3-5: Update Go toolchain and version to current stable releases.

The go directive (1.23.0) and toolchain directive (go1.24.11) are both outdated. As of January 2026, the latest stable Go version is 1.25.5. While the current configuration is technically valid (toolchain can be newer than the go directive), consider updating both to 1.25.5 or a more recent stable release to ensure developers and CI/CD use current versions with the latest security patches and improvements.

⛔ Skipped due to learnings
Learnt from: CR
Repo: UbiquitousLearning/mllm PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-25T07:26:06.575Z
Learning: Applies to {mllm,mllm-cli,pymllm}/**/*.{toml,json,txt,md} : When suggesting new dependencies, evaluate their maturity, licensing, and maintenance status. Prefer well-established and actively maintained libraries.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In `@docs/service/mllm_cli.rst`:
- Line 11: The LLM entry currently shows a comma-separated pair inside one code
literal which is ambiguous; update the docs so each model appears clearly as its
own item or as two separate code literals joined with "and" — edit the line with
the code literal "mllmTeam/Qwen3-0.6B-w4a32kai,mllmTeam/Qwen3-4B-w4a8-i8mm-kai"
and replace it with either separate bullet lines each containing a single code
literal (e.g., "mllmTeam/Qwen3-0.6B-w4a32kai" and
"mllmTeam/Qwen3-4B-w4a8-i8mm-kai") or a single sentence using two code literals
separated by "and" to remove ambiguity.
- Around line 217-218: Update the explanatory comment around the adb command so
it accurately describes that `adb connect <device-ip:port>` establishes a TCP/IP
(network) connection to a device and is not used for USB-connected devices;
replace or clarify the phrase "if not already connected via USB" to state that
USB devices are detected automatically and `adb connect` is only needed for
network connections (reference the line containing `adb connect
<device-ip:port>` and the adjacent comment text).

In `@mllm-cli/mllm/c.go`:
- Line 10: Remove all trailing whitespace in the modified source file so it
adheres to the project's no-trailing-whitespace guideline: trim end-of-line
spaces across the file (there are 10 occurrences reported) including the lines
around the new include directive "#include \"mllm/c_api/Runtime.h\"" so that no
line ends with extraneous spaces and the file saves with clean line endings.
🧹 Nitpick comments (1)
docs/service/mllm_cli.rst (1)

139-152: Consider mentioning the client build configuration.

The section references tasks/build_android_mllm_server.yaml for environment variable configuration, but the PR title indicates build_android_mllm_client.yaml was also updated. If the client YAML requires the same environment variable checks (ANDROID_NDK_HOME, GOPROXY), consider briefly mentioning it here for completeness.

📝 Suggested addition
 Open `tasks/build_android_mllm_server.yaml` and check the following variables:
+
+(The same environment variables apply to `tasks/build_android_mllm_client.yaml` if you plan to compile the Go client.)
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c9c99a7 and db6e8ff.

📒 Files selected for processing (2)
  • docs/service/mllm_cli.rst
  • mllm-cli/mllm/c.go
🧰 Additional context used
📓 Path-based instructions (1)
{mllm,mllm-cli,pymllm}/**/*

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

{mllm,mllm-cli,pymllm}/**/*: Files must not contain C0 control codes 0x00–0x08, 0x0B–0x0C, 0x0E–0x1F, C1 control codes 0x7F–0x9F, or DEL 0x7F. Horizontal tab (0x09) and line feed (0x0A) are explicitly allowed.
All files must be encoded in UTF-8 without BOM.
Any violation of character set (Rule 1) or encoding (Rule 2) requirements must cause the review to fail.
No line may end with trailing whitespace.
Use Unix line endings (LF).
File and directory names must consist only of printable Unicode characters, excluding C0 control codes 0x00–0x08, 0x0B–0x0C, 0x0E–0x1F, C1 control codes 0x7F–0x9F, and DEL 0x7F.
Only use acceptable file extensions: .c, .cc, .cpp, .cxx, .h, .hh, .hpp, .py, .pyi, .sh, .txt, .md, .yml, .yaml, .json, .toml.
Optional license headers, if present, must comply with character set rules (no C0/C1 control codes except tab and line feed).

Files:

  • mllm-cli/mllm/c.go
🧠 Learnings (6)
📚 Learning: 2025-11-25T07:26:06.575Z
Learnt from: CR
Repo: UbiquitousLearning/mllm PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-25T07:26:06.575Z
Learning: Applies to {mllm,mllm-cli,pymllm}/**/*.{c,cc,cpp,cxx,h,hh,hpp,py,pyi,sh} : Encourage consistent coding style and patterns with the existing codebase.

Applied to files:

  • docs/service/mllm_cli.rst
  • mllm-cli/mllm/c.go
📚 Learning: 2025-11-25T07:26:06.575Z
Learnt from: CR
Repo: UbiquitousLearning/mllm PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-25T07:26:06.575Z
Learning: Applies to {mllm,mllm-cli,pymllm}/**/*.{c,cc,cpp,cxx,h,hh,hpp,py,pyi,sh} : Ensure code is portable across supported platforms (e.g., Linux, Windows) unless explicitly platform-specific.

Applied to files:

  • docs/service/mllm_cli.rst
📚 Learning: 2025-11-25T07:26:06.575Z
Learnt from: CR
Repo: UbiquitousLearning/mllm PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-25T07:26:06.575Z
Learning: Applies to {mllm,mllm-cli,pymllm}/**/*.{c,cc,cpp,cxx,py,pyi} : Add comments for complex algorithms or non-obvious logic.

Applied to files:

  • docs/service/mllm_cli.rst
📚 Learning: 2025-11-25T07:26:06.575Z
Learnt from: CR
Repo: UbiquitousLearning/mllm PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-25T07:26:06.575Z
Learning: Applies to {mllm,mllm-cli,pymllm}/**/*.{c,cc,cpp,cxx,h,hh,hpp,py,pyi} : Ensure public APIs, classes, and functions have clear docstrings or comments explaining purpose, parameters, returns, and errors.

Applied to files:

  • docs/service/mllm_cli.rst
📚 Learning: 2025-11-25T07:26:06.575Z
Learnt from: CR
Repo: UbiquitousLearning/mllm PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-25T07:26:06.575Z
Learning: Applies to {mllm,mllm-cli,pymllm}/**/*.{c,cc,cpp,cxx,h,hh,hpp,py,pyi} : Adhere to language-specific best practices and idioms (e.g., PEP 8 for Python, Google C++ Style Guide for C++).

Applied to files:

  • docs/service/mllm_cli.rst
📚 Learning: 2025-11-25T07:26:06.575Z
Learnt from: CR
Repo: UbiquitousLearning/mllm PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-25T07:26:06.575Z
Learning: Applies to {mllm,mllm-cli,pymllm}/**/*.{c,cc,cpp,cxx,py,pyi} : Use named constants instead of magic numbers.

Applied to files:

  • docs/service/mllm_cli.rst
🔇 Additional comments (2)
docs/service/mllm_cli.rst (1)

139-233: Excellent documentation improvements for portability.

The restructured Build Configuration and Deployment sections significantly improve the documentation by:

  • Replacing hardcoded paths with dynamic $(pwd)-based references
  • Clearly identifying environment variables that users must configure (ANDROID_NDK_HOME, GOPROXY)
  • Streamlining the deployment workflow with clear, numbered steps
  • Using environment variables (ANDROID_DIR) for better readability

This aligns well with the PR objective to "support the latest build environment" and makes the documentation much more portable across different development machines.

mllm-cli/mllm/c.go (1)

143-145: LGTM!

The SessionID() accessor is straightforward, and ensuring a proper newline at end-of-file is good practice.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

**Currently, the system officially supports the following models:**

* **LLM**: ``mllmTeam/Qwen3-0.6B-w4a32kai``
* **LLM**: ``mllmTeam/Qwen3-0.6B-w4a32kai,mllmTeam/Qwen3-4B-w4a8-i8mm-kai``
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 | 🟡 Minor

Clarify model list formatting.

The comma-separated list of models within a single code literal (mllmTeam/Qwen3-0.6B-w4a32kai,mllmTeam/Qwen3-4B-w4a8-i8mm-kai) may confuse readers about whether this is a literal string to use somewhere or two separate supported models.

Consider reformatting as separate bulleted items for clarity:

📝 Suggested formatting improvement
-* **LLM**: ``mllmTeam/Qwen3-0.6B-w4a32kai,mllmTeam/Qwen3-4B-w4a8-i8mm-kai``
+* **LLM**: 
+    * ``mllmTeam/Qwen3-0.6B-w4a32kai``
+    * ``mllmTeam/Qwen3-4B-w4a8-i8mm-kai``

Or use "and" to separate:

-* **LLM**: ``mllmTeam/Qwen3-0.6B-w4a32kai,mllmTeam/Qwen3-4B-w4a8-i8mm-kai``
+* **LLM**: ``mllmTeam/Qwen3-0.6B-w4a32kai`` and ``mllmTeam/Qwen3-4B-w4a8-i8mm-kai``
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
* **LLM**: ``mllmTeam/Qwen3-0.6B-w4a32kai,mllmTeam/Qwen3-4B-w4a8-i8mm-kai``
* **LLM**:
* ``mllmTeam/Qwen3-0.6B-w4a32kai``
* ``mllmTeam/Qwen3-4B-w4a8-i8mm-kai``
Suggested change
* **LLM**: ``mllmTeam/Qwen3-0.6B-w4a32kai,mllmTeam/Qwen3-4B-w4a8-i8mm-kai``
* **LLM**: ``mllmTeam/Qwen3-0.6B-w4a32kai`` and ``mllmTeam/Qwen3-4B-w4a8-i8mm-kai``
🤖 Prompt for AI Agents
In `@docs/service/mllm_cli.rst` at line 11, The LLM entry currently shows a
comma-separated pair inside one code literal which is ambiguous; update the docs
so each model appears clearly as its own item or as two separate code literals
joined with "and" — edit the line with the code literal
"mllmTeam/Qwen3-0.6B-w4a32kai,mllmTeam/Qwen3-4B-w4a8-i8mm-kai" and replace it
with either separate bullet lines each containing a single code literal (e.g.,
"mllmTeam/Qwen3-0.6B-w4a32kai" and "mllmTeam/Qwen3-4B-w4a8-i8mm-kai") or a
single sentence using two code literals separated by "and" to remove ambiguity.

Comment on lines +217 to 218
adb connect <device-ip:port>

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 | 🟡 Minor

Clarify connection method in comment.

The comment states "if not already connected via USB" but the command adb connect <device-ip:port> is specifically for establishing a network (TCP/IP) connection, not USB. USB-connected devices don't require the adb connect command—they're automatically detected when physically connected.

Consider updating the comment to reflect the actual use case:

📝 Suggested correction
-   # 1. Connect to device (if not already connected via USB)
+   # 1. Connect to device over network (skip if already connected via USB or network)
    adb connect <device-ip:port>

Or if USB is assumed:

-   # 1. Connect to device (if not already connected via USB)
-   adb connect <device-ip:port>
+   # 1. Ensure device is connected (via USB or run 'adb connect <device-ip:port>' for network)
🤖 Prompt for AI Agents
In `@docs/service/mllm_cli.rst` around lines 217 - 218, Update the explanatory
comment around the adb command so it accurately describes that `adb connect
<device-ip:port>` establishes a TCP/IP (network) connection to a device and is
not used for USB-connected devices; replace or clarify the phrase "if not
already connected via USB" to state that USB devices are detected automatically
and `adb connect` is only needed for network connections (reference the line
containing `adb connect <device-ip:port>` and the adjacent comment text).

#cgo LDFLAGS: -lMllmSdkC -lMllmRT -lMllmCPUBackend

#include <mllm/mllm-c.h>
#include "mllm/c_api/Runtime.h"
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

🏁 Script executed:

#!/bin/bash

# Find Runtime.h header file
echo "=== Searching for Runtime.h ==="
fd -t f "Runtime.h"

echo -e "\n=== Searching for mllm/c_api directory ==="
fd -t d "c_api"

echo -e "\n=== Listing files in mllm/c_api if it exists ==="
find . -type d -name "c_api" -exec ls -la {} \;

Repository: UbiquitousLearning/mllm

Length of output: 927


🏁 Script executed:

#!/bin/bash

echo "=== Content of mllm/c_api/Runtime.h ==="
cat -n mllm/c_api/Runtime.h

echo -e "\n=== Checking c.go file (first 30 lines) ==="
head -n 30 mllm-cli/mllm/c.go

echo -e "\n=== Checking c.go file for all function calls ==="
grep -E "(isOk|initializeContext|shutdownContext|startService|stopService|setLogLevel|createQwen3Session|createDeepseekOCRSession|freeSession|insertSession|sendRequest|pollResponse|freeResponseString|MllmCAny)" mllm-cli/mllm/c.go | head -20

Repository: UbiquitousLearning/mllm

Length of output: 3590


🏁 Script executed:

#!/bin/bash

echo "=== Content of mllm/c_api/Object.h ==="
cat -n mllm/c_api/Object.h

echo -e "\n=== Checking c.go for complete function usage ==="
grep -n "C\." mllm-cli/mllm/c.go | grep -E "(isOk|initializeContext|shutdownContext|startService|stopService|setLogLevel|createQwen3Session|createDeepseekOCRSession|freeSession|insertSession|sendRequest|pollResponse|freeResponseString)" | head -30

echo -e "\n=== Checking c.go file size and encoding ==="
wc -l mllm-cli/mllm/c.go
file mllm-cli/mllm/c.go

echo -e "\n=== Checking for trailing whitespace in c.go ==="
rg -n " $|	$" mllm-cli/mllm/c.go

echo -e "\n=== Checking line endings in c.go ==="
file -b mllm-cli/mllm/c.go | grep -i "line"

echo -e "\n=== Checking for control codes in c.go ==="
od -c mllm-cli/mllm/c.go | grep -E "\\\\[0-7]{3}" | head -5

Repository: UbiquitousLearning/mllm

Length of output: 3533


🏁 Script executed:

#!/bin/bash

echo "=== Complete analysis of trailing whitespace in c.go ==="
cat -n mllm-cli/mllm/c.go | grep -E " $|	$"

echo -e "\n=== Count of lines with trailing whitespace ==="
grep -c " $\|	$" mllm-cli/mllm/c.go

echo -e "\n=== Verify UTF-8 encoding ==="
hexdump -C mllm-cli/mllm/c.go | head -20

echo -e "\n=== Check for BOM ==="
head -c 3 mllm-cli/mllm/c.go | od -An -tx1

Repository: UbiquitousLearning/mllm

Length of output: 1034


🏁 Script executed:

#!/bin/bash

echo "=== Reading c.go to show trailing whitespace context ==="
sed -n '65,75p' mllm-cli/mllm/c.go | cat -A
sed -n '78,90p' mllm-cli/mllm/c.go | cat -A
sed -n '130,145p' mllm-cli/mllm/c.go | cat -A

echo -e "\n=== Verify all C function declarations are present in Runtime.h ==="
echo "Functions used in c.go that must be declared in Runtime.h:"
echo "- initializeContext: $(grep -c 'initializeContext()' mllm/c_api/Runtime.h)"
echo "- shutdownContext: $(grep -c 'shutdownContext()' mllm/c_api/Runtime.h)"
echo "- isOk: $(grep -c 'isOk(' mllm/c_api/Runtime.h)"
echo "- startService: $(grep -c 'startService(' mllm/c_api/Runtime.h)"
echo "- stopService: $(grep -c 'stopService()' mllm/c_api/Runtime.h)"
echo "- setLogLevel: $(grep -c 'setLogLevel(' mllm/c_api/Runtime.h)"
echo "- createQwen3Session: $(grep -c 'createQwen3Session(' mllm/c_api/Runtime.h)"
echo "- createDeepseekOCRSession: $(grep -c 'createDeepseekOCRSession(' mllm/c_api/Runtime.h)"
echo "- freeSession: $(grep -c 'freeSession(' mllm/c_api/Runtime.h)"
echo "- insertSession: $(grep -c 'insertSession(' mllm/c_api/Runtime.h)"
echo "- sendRequest: $(grep -c 'sendRequest(' mllm/c_api/Runtime.h)"
echo "- pollResponse: $(grep -c 'pollResponse(' mllm/c_api/Runtime.h)"
echo "- freeResponseString: $(grep -c 'freeResponseString(' mllm/c_api/Runtime.h)"
echo "- MllmCAny: $(grep -c 'MllmCAny' mllm/c_api/Object.h)"

Repository: UbiquitousLearning/mllm

Length of output: 1672


The new header "mllm/c_api/Runtime.h" correctly provides all required C API declarations, so the include change at line 10 is valid.

However, the file has trailing whitespace on 10 lines (69, 80, 81, 84, 95, 107, 115, 126, 134, 139), which violates the coding guideline requiring no trailing whitespace. Remove trailing spaces from these lines.

🤖 Prompt for AI Agents
In `@mllm-cli/mllm/c.go` at line 10, Remove all trailing whitespace in the
modified source file so it adheres to the project's no-trailing-whitespace
guideline: trim end-of-line spaces across the file (there are 10 occurrences
reported) including the lines around the new include directive "#include
\"mllm/c_api/Runtime.h\"" so that no line ends with extraneous spaces and the
file saves with clean line endings.

Copy link
Collaborator

@chenghuaWang chenghuaWang left a comment

Choose a reason for hiding this comment

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

LGTM

@chenghuaWang chenghuaWang merged commit 4484f7c into UbiquitousLearning:main Jan 14, 2026
2 checks passed
@yuerqiqi yuerqiqi deleted the my-feature-dev branch January 14, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants