Pulse/internal/ai/providers
courtmanr@gmail.com eb665b2a0d
Some checks failed
Build and Test / Secret Scan (push) Waiting to run
Build and Test / Frontend & Backend (push) Waiting to run
Canonical Governance / governance (push) Waiting to run
Core E2E Tests / Playwright Core E2E (shard 1/8) (push) Waiting to run
Core E2E Tests / Playwright Core E2E (shard 2/8) (push) Waiting to run
Core E2E Tests / Playwright Core E2E (shard 3/8) (push) Waiting to run
Core E2E Tests / Playwright Core E2E (shard 4/8) (push) Waiting to run
Core E2E Tests / Playwright Core E2E (shard 5/8) (push) Waiting to run
Core E2E Tests / Playwright Core E2E (shard 6/8) (push) Waiting to run
Core E2E Tests / Playwright Core E2E (shard 7/8) (push) Waiting to run
Core E2E Tests / Playwright Core E2E (shard 8/8) (push) Waiting to run
Core E2E Tests / Agent registration lifecycle (push) Waiting to run
Core E2E Tests / E2E verdict (push) Blocked by required conditions
Patrol Qualification Regression / Catalog, scorer, and replay regression (push) Has been cancelled
fix(ai): make Patrol readiness probes representative of the Patrol runtime
The readiness advisor failed capable local models for adapter and probe
defects rather than model incapability (#1624 Ollama, #1614 llama.cpp):

- Send num_ctx sized to the haystack fixtures (clamped to the model's
  trained window) so Ollama no longer truncates ~25KB prompts at its
  4096-token server default; the trained-window guard alone passed while
  the runtime request was being truncated.
- Forward an explicitly pinned temperature 0 instead of dropping it to
  Ollama's 0.8 default against a nonce-exact validator (ChatRequest gains
  TemperatureSet; Ollama options temperature is now a pointer).
- Raise the probe generation cap from 256 to 2048 tokens so qwen3-style
  <think> reasoning cannot exhaust the budget before the tool call, and
  surface the provider done_reason when validation fails.
- Synthesise tool-call IDs in the OpenAI-compatible adapter (streaming
  finalizer and buffered path) when the server omits them, as llama.cpp
  commonly does, mirroring the Ollama adapter instead of failing tool
  protocol 0/3 on transport shape.
- Probe with the Patrol loop's 60s stream stall allowance instead of the
  12s chat default (chat.PatrolProviderStreamIdleTimeout is now exported).
- Stop discarding probe and validator errors: log them, carry them in a
  new PatrolModelReadinessResult.Details field surfaced through the API
  snapshot and Settings UI, and keep a transport-level probe failure's
  specific diagnosis instead of overwriting it with the generic
  capability wording.

Builds on 4a2335ce7, which already reclassifies protocol failure as
"provider connected; Patrol capability not verified".

Fixes #1624
Fixes #1614

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-26 12:49:24 +01:00
..
anthropic.go Fix Gemini Patrol tool-call readiness 2026-07-06 23:01:16 +01:00
anthropic_test.go Fix Gemini Patrol tool-call readiness 2026-07-06 23:01:16 +01:00
context_limits.go Update DeepSeek Patrol defaults 2026-05-08 01:24:50 +01:00
context_limits_branchcov_test.go Add branch-coverage tests for provider context and tool-choice helpers 2026-07-15 15:08:59 +01:00
context_limits_test.go Update DeepSeek Patrol defaults 2026-05-08 01:24:50 +01:00
factory.go fix(ai): harden local compatible providers 2026-07-24 12:35:31 +01:00
factory_test.go Allow bounded subscription-agent preflights 2026-07-16 09:54:34 +01:00
gemini.go Fix Gemini Patrol tool-call readiness 2026-07-06 23:01:16 +01:00
gemini_stream_test.go Fix Gemini Patrol tool-call readiness 2026-07-06 23:01:16 +01:00
gemini_test.go Fix Gemini Patrol tool-call readiness 2026-07-06 23:01:16 +01:00
integration_test.go Restrict Ollama provider outbound transport 2026-04-22 05:25:57 +01:00
issue1614_openai_toolcall_id_test.go fix(ai): make Patrol readiness probes representative of the Patrol runtime 2026-07-26 12:49:24 +01:00
issue1624_ollama_probe_options_test.go fix(ai): make Patrol readiness probes representative of the Patrol runtime 2026-07-26 12:49:24 +01:00
notable_models.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
notable_models_test.go Refactor: AI provider and executor multi-tenancy support 2026-01-22 16:51:45 +00:00
ollama.go fix(ai): make Patrol readiness probes representative of the Patrol runtime 2026-07-26 12:49:24 +01:00
ollama_test.go fix(ai): harden local compatible providers 2026-07-24 12:35:31 +01:00
openai.go fix(ai): make Patrol readiness probes representative of the Patrol runtime 2026-07-26 12:49:24 +01:00
openai_compatibility_test.go fix(ai): harden local compatible providers 2026-07-24 12:35:31 +01:00
openai_helpers_branchcov_test.go Add branch-coverage tests for provider context and tool-choice helpers 2026-07-15 15:08:59 +01:00
openai_test.go fix(ai): harden local compatible providers 2026-07-24 12:35:31 +01:00
provider.go fix(ai): make Patrol readiness probes representative of the Patrol runtime 2026-07-26 12:49:24 +01:00
provider_contract_test.go backend and governance: MCP contract, agent capabilities, API, and release-control 2026-06-23 17:26:15 +01:00
provider_normalize_branchcov0719pm_test.go Add Go branch-coverage tests for pure helpers across six packages 2026-07-19 15:11:02 +01:00
rate_limit.go feat(backend): implement AI Patrol, Investigation, and system-wide refactors 2026-01-30 19:02:14 +00:00
rate_limit_branchcov_test.go Add branch-coverage tests for provider context and tool-choice helpers 2026-07-15 15:08:59 +01:00
subscription_agent.go Bound automatic Patrol inference allowances 2026-07-16 19:55:44 +01:00
subscription_agent_live_test.go Stabilize Claude subscription completion transport 2026-07-16 12:38:19 +01:00
subscription_agent_test.go Bound automatic Patrol inference allowances 2026-07-16 19:55:44 +01:00
tool_choice_branchcov_test.go Add branch-coverage tests for provider context and tool-choice helpers 2026-07-15 15:08:59 +01:00