MAI-Code-1-Flash model frequently OOM-killed while Haiku/Sonnet succeed on same prompts
- 主要语言
- Shell
- 星标
- 11.2k
- 派生
- 1.9k
- 平均合并
- 14 小时 16 分钟
- 30 天内合并 PR
- 6
描述
## Environment
- **OS:** Ubuntu 24.04, Azure VM (Standard_DS2_v2)
- **RAM:** 7.7 GB + 4 GB swap
- **Available memory at time of test:** ~5.5 GB
- **Copilot CLI version:** 1.0.60
- **Node.js:** v22.22.2
## Problem
The `mai-code-1-flash-internal` model is frequently killed by the Linux OOM killer when running via Copilot CLI, while other models (`claude-haiku-4.5`, `claude-sonnet-4.6`) succeed on the exact same prompts under identical conditions.
## Question
Is the higher memory consumption of `mai-code-1-flash-internal` compared to other models (e.g. `claude-haiku-4.5`) an expected/known behavior, or is this a bug? If expected, is there documentation on per-model memory requirements?
## Steps to Reproduce
1. Clear page cache: `sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'`
2. Confirm ~5.5 GB available memory
3. Run: `copilot -p 'Review myfile.py for bugs' --model mai-code-1-flash-internal --allow-all-tools`
4. Process exits with SIGKILL (OOM) within 30-60 seconds
5. Run same prompt with `--model claude-haiku-4.5` — succeeds
## Observations
- Simple prompts (`copilot -p 'say hello'`) work fine with MAI
- MAI fails consistently when using `--allow-all-tools` and reading files >200 lines
- Even without `--allow-all-tools`, piping file content (242 lines / 8KB) into the prompt causes OOM with MAI but not with Haiku
- After consecutive copilot invocations, residual copilot processes (~274 MB each) sometimes linger, compounding memory pressure
- Several background services reduce available memory but ~5.5 GB remains — which should be sufficient
## Expected Behavior
MAI-Code-1-Flash should have similar or lower memory footprint compared to Claude Haiku, given that it is positioned as a lightweight/fast model.
## Workaround
Using `claude-haiku-4.5` or `claude-sonnet-4.6` instead of MAI for code review tasks.
贡献指南
调研方向
在指定的 Ubuntu 环境中重现报告的 `copilot -p` 命令,比较 `mai-code-1-flash-internal` 和 `claude-haiku-4.5`,同时监控内存使用情况和残留进程。完成的标准是确定原因是否为模型的内存使用或残留进程,并记录预期的要求或已确认的 CLI bug。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- linux, node.js, shell
- 领域
- cli, operating-systems, performance
- Issue 类型
- 缺陷
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 冷清
- 描述清晰度
- 需要澄清
- 新手友好度
- 30/100