Repository navigation
Description
Summary
Setting up cora hook install with a custom LLM model (glm-5.1 via Z.AI proxy) was frustrating. The pre-commit hook kept defaulting to gpt-4o-mini + OpenAI despite having model config in .cora.yaml.
Steps to Reproduce
cora init— creates.cora.yamlwith no model/provider/base_url fields- Manually add
model: glm-5.1to top-level of.cora.yaml cora hook install- Make a commit → hook runs but uses
gpt-4o-mini(ignored YAML config) - Hook fails with API error because
gpt-4o-minidoesn't exist on Z.AI endpoint
Expected Behavior
cora initshould ask for or detect model/provider/base_url, or at minimum document how to set them.cora.yamltop-levelmodel:key should be read by the hookcora config showshould reflect.cora.yamlvalues without needingcora config set
Actual Behavior
cora initcreates a bare config with no provider info- Top-level
model:in YAML is silently ignored - Only
cora config set model glm-5.1+cora config set base_url ...+cora config set provider openaiactually writes the correct keys - Had to run
cora config showto discover the resolved config was stillgpt-4o-mini - Hook fails with exit code 1 on "No changes to review" which is confusing (error vs no-op)
Specific Pain Points
1. cora init doesn't set provider info
Running cora init creates:
language: dart
auto_review: true
rules: [...]No provider, model, or base_url anywhere. A new user has no idea they need to add these.
2. YAML top-level model: is ignored
Adding this to .cora.yaml does nothing:
model: glm-5.1Only cora config set model glm-5.1 works, which rewrites the YAML into a different format.
3. No validation on init
cora init should validate that the configured model/provider is reachable, or at least warn if defaults won't work.
4. Hook error on empty diff
When --staged has no changes, cora exits with code 1 (error) instead of 0 (success/no-op). The hook interprets this as an error and shows ⚠️ cora review encountered an error which is misleading.
Environment
- cora v0.3.0
- OS: Linux ARM64 (Debian)
- Provider: openai-compatible (Z.AI proxy at custom base_url)
- Model: glm-5.1
Suggested Improvements
cora initshould be interactive — ask for provider, model, base_url, and API key setup.cora.yamlshould have aprovider:section that the hook reads:provider: name: openai model: glm-5.1 base_url: https://api.z.ai/api/coding/paas/v4
- Validate config after init —
cora config validateor built-in check - Empty diff should exit 0 —
--stagedwith no changes is not an error - Better error messages — if model not found, say "model X not found at base_url Y" instead of generic error
Great tool btw — the review quality with glm-5.1 is excellent. Just the setup flow needs love.
Activity