Skip to content

feat(agy): --model support + corrected reasoning-effort model mappings (#38) - #39

Merged
starhunt merged 2 commits into
mainfrom
feat/38-agy-model-flag
Jun 23, 2026
Merged

starhunt merged 2 commits into
mainfrom
feat/38-agy-model-flag

Conversation

@starhunt

Copy link
Copy Markdown
Owner

Summary

이슈 #38(@deadcoder0904) 검토 후 방향은 채택, 구현 형식은 정정하여 반영.

agy CLI가 1.0.0 → 1.0.10으로 업데이트되며 --model 플래그가 생겼고, agy models에 effort별 모델(Gemini 3.5 Flash Low/Medium/High 등)이 분리 노출됩니다. 이슈의 핵심 요구(effort 선택)는 유효합니다.

다만 이슈 제안의 모델 식별자 형식(gemini-3.5-flash-low)은 동작하지 않습니다. 실측 결과 agy는 알 수 없는 라벨을 에러 없이 조용히 기본값(Gemini 3.5 Flash Medium)으로 폴백합니다:

resolver.go:85] Model ID gemini-3.5-flash-low not in local config, defaulting to CCPA
model_config_manager.go:157] Propagating selected model override to backend: label="Gemini 3.5 Flash (Medium)"   # ← 항상 Medium!

agy가 실제로 해석하는 식별자는 agy models가 출력하는 표시명 라벨입니다:

model="Gemini 3.5 Flash (Low)"  → label="Gemini 3.5 Flash (Low)"   # ✓ 정확히 전파

채택/정정 내역

이슈 제안 본 PR
buildArgs에 --model 추가 ✅ 채택 — 매핑 actual_model을 직접 --model로 전달
effort 접미사 합성 gemini-3.5-flash-low ❌ 정정 — 조용히 Medium 폴백. 표시명 라벨 "Gemini 3.5 Flash (Low)"로 매핑
config 3개 매핑 추가 ✅ 채택 — 단, 올바른 표시명 actual_model
seed: 매 재시작 강제 upsert ❌ 정정 — 대시보드 편집 클로버링 회귀. **additive(누락 alias만 추가)**로 채택

effort 접미사 자동 합성을 쓰지 않은 이유: agy 모델 라인업이 라벨 형식을 공유하지 않습니다(Gemini 3.1 Pro는 Medium 없음, Claude는 (Thinking)). 임의 effort 접미사는 그대로 silent-fallback 함정이 됩니다. actual_model 직접 전달은 전 모델을 안전하게 지원합니다.

config.yaml은 gitignore(머신별 cli_path) → 추적 템플릿 config.example.yaml에만 반영. 로컬 config.yaml도 함께 갱신됨.

Test plan

  • npm run build 성공
  • npm test — 210 passed / 1 skipped, 회귀 0건 (기준선 197 → 210, 신규 13건)
  • agy 단위 테스트 13건 통과 (placeholder skip / 라벨 전달 / -p 순서 / extra_args --model 중복 방지 / 빈 model)
  • config Zod 검증: loadConfig(config.yaml/config.example.yaml) 통과, 라벨 보존
  • 실 agy 1.0.10 동작 실측: --model "Gemini 3.5 Flash (Low)" → 백엔드 label="Gemini 3.5 Flash (Low)" 전파 확인 (resolver 로그)

Closes #38

🤖 Generated with Claude Code

starhunt and others added 2 commits June 23, 2026 10:42
agy 1.0.10 adds the --model flag (1.0.0 had none). Forward the mapping's
actual_model as --model, using the exact display-name label `agy models`
prints (e.g. "Gemini 3.5 Flash (Low)"). The "antigravity" placeholder is
skipped so agy auto-selects, preserving prior behaviour.

Adds gemini-3.5-flash-{low,medium,high} mappings to config(.example).yaml.

[gotcha] An unknown --model label is silently ignored and falls back to the
backend default (Gemini 3.5 Flash Medium) — verified via resolver.go logs.
So issue #38's `gemini-3.5-flash-low` format would always yield Medium; the
parenthesised display label is the only identifier agy resolves.

Refs #38

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YTfJbCw7cUpZHAqq4ZnMWo
Seed config.yaml mappings whose alias is not yet in the DB, instead of only
seeding when the table is empty. New config aliases now propagate on restart
without a manual dashboard add.

Existing rows are never overwritten or deleted: the DB is the runtime SSOT and
the dashboard (admin/model-mappings) edits it, so issue #38's proposed
"force upsert every startup" would clobber user edits — rejected in favour of
this additive variant.

[followup] mappings removed/edited in config are not auto-removed/updated.

Refs #38

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YTfJbCw7cUpZHAqq4ZnMWo
@starhunt
starhunt merged commit 7575e7c into main Jun 23, 2026
1 check passed
@starhunt
starhunt deleted the feat/38-agy-model-flag branch June 23, 2026 01:45
starhunt added a commit that referenced this pull request Jun 23, 2026
Follow-up to #39 (issue #38 comment): agy exposes Gemini 3.1 Pro (Low) and
(High) in `agy models`, but #39 only mapped the Gemini 3.5 Flash trio. Add the
two 3.1 Pro presets (Pro has no Medium variant). actual_model uses the exact
display-name label agy resolves.

Verified end-to-end: both labels resolve via agy (resolver "Propagating
label=..."), test-model returns OK, and routing gemini-3.1-pro-high through
/v1/chat/completions emits `agy --model "Gemini 3.1 Pro (High)" -p` (debug
cliArgs).

Closes #42


Claude-Session: https://claude.ai/code/session_01YTfJbCw7cUpZHAqq4ZnMWo

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

Gemini model reasoning_effort in agy to use low, medium, high

1 participant