Skip to content

fix: stabilize local model review flow#16

Merged
ftchvs merged 4 commits into
mainfrom
codex/local-model-review-controls
May 10, 2026
Merged

fix: stabilize local model review flow#16
ftchvs merged 4 commits into
mainfrom
codex/local-model-review-controls

Conversation

@ftchvs
Copy link
Copy Markdown
Owner

@ftchvs ftchvs commented May 10, 2026

Summary

  • Stabilizes local model review runs so the UI recovers from slow or stuck Ollama calls instead of leaving the form disabled.
  • Exposes installed local review models as real dropdown options and adds an All platform mode for broader policy checks.
  • Bounds local API model generation and disables Ollama thinking output for classifier calls so installed review models can return parseable AdLint JSON.

Changes

  • adlint/static/app.js adds timeout-controlled /analyze fetches, model option population, and review-model filtering.
  • adlint/static/index.html changes model selection to a dropdown and adds the All platform option.
  • adlint/policy.py and adlint/rules/engine.py make platform=all include platform-scoped policies and LinkedIn derived rules.
  • adlint/classifiers/ollama.py sends think: false and accepts fenced JSON responses from local models.
  • Makefile starts the local API with bounded Ollama timeout and token generation settings.
  • Tests cover UI assets, model controls, all-platform filtering, timeout recovery hooks, deterministic Ollama payloads, and fenced JSON parsing.

Test plan

  • make test
  • Live local-model matrix with ADLINT_OLLAMA_TIMEOUT=180 ADLINT_OLLAMA_NUM_PREDICT=1024: gpt-oss-safeguard:20b, gpt-oss:20b, qwen3-coder:30b, qwen3.5:35b-a3b, and gemma4:26b all returned model.status: ok
  • Browser smoke at http://127.0.0.1:8000/ui/ with gpt-oss-safeguard:20b returning model.status: ok
  • Browser smoke with gemma4:26b returning model.status: ok

Notes

  • Embedding-only Ollama models remain filtered out of the UI because they are not review/chat models. Future model additions should still be validated against the strict adlint.model_review.v1 schema.

@ftchvs ftchvs self-assigned this May 10, 2026
@ftchvs
Copy link
Copy Markdown
Owner Author

ftchvs commented May 10, 2026

@claude please review

ftchvs and others added 3 commits May 10, 2026 19:30
- Promote "all" platform sentinel to ALL_PLATFORMS constant in models.
- Promote embedding-model exclusion list to EMBEDDING_MODEL_MARKERS.
- Drop unreachable branch in fenced-JSON candidate extractor.
- Cache escapeHtml output per option in populateModelOptions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ftchvs ftchvs marked this pull request as ready for review May 10, 2026 23:08
@ftchvs ftchvs merged commit fe9d2bb into main May 10, 2026
2 checks passed
@ftchvs ftchvs deleted the codex/local-model-review-controls branch May 13, 2026 14:12
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.

1 participant