sidecall: fm_available reports the on-device model unavailable whenever Private Cloud Compute is, so local_model=fm never runs
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/100
Hướng nghiên cứu
Bắt đầu tại tokeneconomizer/plugin/sidecall.py, ở fm_available, và so sánh bước kiểm tra khả dụng của nó với model system được fm_call sử dụng. Tái hiện bằng fm models trong cùng ngữ cảnh hook được mô tả trong issue; lệnh có thể thoát với mã 1 dù system đã sẵn sàng. Hoàn tất khi local_model=fm nhận diện được trường hợp đó và có thể thấy fallback khi không khả dụng trong errors.log hoặc doctor.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
tokeneconomizer/plugin/sidecall.py decides whether the on-device model can take a side call with fm_available, which runs fm available and requires exit status 0 (sidecall.py#L819-L833). But fm available lists every Apple Foundation Models provider and exits 1 as soon as one of them is unavailable, even when the on-device system model, the one fm_call uses, is ready. Private Cloud Compute is unavailable outside the Terminal app, and the agents run their hooks outside it, so on such a Mac fm_available() is always False. With local_model=fm, every judge call then falls back to the agent's CLI, silently: nothing is written to errors.log, and status does not say the on-device judge is unused.
fm available on macOS 27.2.1, run from a Claude Code Bash tool (not Terminal.app):
warning: 'fm available' has been renamed to 'fm models'; 'available' still works but is deprecated.
Apple Foundation Models
✓ system (AFM 3 Core Advanced)
✗ pcc (Private Cloud Compute is not available in this context. Please use the Terminal app.)
Exit status: 1 (fm models prints the same and also exits 1).
Reproduction:
from tokeneconomizer.plugin import sidecall as s
print(s.fm_available())
print(s.fm_call("An agent ran the same failing test 9 times with identical errors and no edits. Is it stuck?",
schema=s.JUDGE_SCHEMA))
Expected: True, since the call below it works.
Actual:
False
('{"confidence": 0.95, "reason": "Consistent failure across multiple runs indicates a systemic issue.", "stuck": true}', 0)
A possible fix: judge availability from the system line (✓ system), not from the exit status, and move to fm models, since available is deprecated. When local_model=fm is set but the model is judged unavailable, a line in errors.log or in doctor would make the fallback visible.
Upstream main: 747b8016538c13da7ba9d455b89e5e6595bf5294
Python 3.15.2, macOS 27.2.1 (Apple silicon), Claude Code 2.1.332
- Ngôn ngữ chính
- Python
- Star
- 7.4k
- Fork
- 500
- Merge trung bình
- 1 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 123
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/TokenEconomizer
-
microskills: bundle exec and pnpm exec are recorded as bundle run and pnpm runCó thể đã có người làm @Shizoqua đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
microsoft/TokenEconomizer#344 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
microskills: a command wrapped in bash -lc or zsh -lc is not observedCó thể đã có người làm @Shizoqua đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
microsoft/TokenEconomizer#343 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
README: state the minimum Python version next to the test instructionsCó thể đã có người làm @rahul05ranjan đã nhận 4 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
microsoft/TokenEconomizer#328 · 3 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
loopguard: a PHPUnit or CTest run is judged without its summary, so a failing run can end a turn greenCó thể đã có người làm @Shizoqua đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
microsoft/TokenEconomizer#353 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
trace: the usage a Pi tool reports on its own result is left out of the session's usageCó thể đã có người làm @Shizoqua đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
microsoft/TokenEconomizer#352 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của microsoft/TokenEconomizer
Issue tương tự
-
docs: powerpc not supportedĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
reasons-gate
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
benthomasson/reasons-service#190 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 3 ngày