v1.5.7: synthesis provider routing (#549) + fail-loud on empty attachments (#550) + release bump#551
Merged
the-data-viking merged 2 commits intoJun 5, 2026
Conversation
… fail loudly on empty attachment fetch (#550) #549 — openrouter/anthropic/* synthesis routed to the Anthropic provider: The structured-output engine's final-strike escalation hard-coded the bare `sonnet` alias, which resolves to the *direct* Anthropic provider and demands ANTHROPIC_API_KEY. For an OpenRouter-only caller synthesizing with `openrouter/anthropic/*`, the first two strikes hit OpenRouter correctly but the escalation crossed providers and failed with "Missing API key for Anthropic". Escalation is now provider-aware (`_escalation_model_for`): an `openrouter/` model escalates to an OpenRouter-served Sonnet, staying on OPENROUTER_API_KEY. Also: a fallback synthesis (judge exhausted retries / partial schema) now carries an `is_fallback`/`error` marker in to_dict() and fails the run loudly (run_invalid + structured `synthesis_error`, exit 2) in both the in-run and `panel synthesize` paths, instead of being persisted as a silent near-empty success. #550 — attachment fetch failures degraded silently: A `type: url` attachment that failed to fetch (SSRF/loopback perimeter denial, HTTP error, timeout, empty extraction) was logged as a WARNING and replaced with a placeholder, so personas answered blind and the run reported 0% failure. `lower_url_blocks` now raises `AttachmentFetchError` by default — naming the URL and reason — which the orchestrator records as a failed response (counted in the failure rate and the per-question budget). Added `--allow-empty-attachments` to opt back into best-effort placeholder behaviour. Per-attachment fetch status (`ok`/`failed` + reason) is recorded on each response for auditability. Threaded the flag through run_panel_parallel / run_panel_sync. Documented the loopback/private-address SSRF block (local preview servers can't be URL sources; use inline html/document) in the attachments cookbook. Tests: provider-preserving escalation for openrouter/anthropic/*; end-to-end synthesis routing asserting no Anthropic-key demand; fallback marker + loud failure (in-run and re-synthesize); hard-error-by-default and opt-out for fetch failures; status_sink recording; orchestrator-level URL-attachment failure counting + status persistence. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
All required checks are green (lint, ruff format --check, mypy, tests on 3.10–3.14, coverage 87%, security, install-smoke, site-cli-sync). This PR is merge-ready but pending CODEOWNERS approval — the |
Pre-bumps the version on this PR branch so auto-tag's "nothing to commit" path fires on merge (auto-tag cannot push the bump to main — the main ruleset rejects the Actions bot with GH013). Ships the #549/#550 fixes as v1.5.7 (the v1.5.7 slot — #548's intended release never tagged, latest tag is still v1.5.6). Artifacts re-rendered via the three canonical scripts (render_site.py, render_site_markdown.py, render_server_card.py). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Deploying synthpanel with
|
| Latest commit: |
81fd62e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://732c3576.synthpanel.pages.dev |
| Branch Preview URL: | https://fix-549-550-synthesis-routin.synthpanel.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ships as v1.5.7 (the v1.5.7 slot — #548's intended release never tagged; latest tag is v1.5.6, so this patch-bumps to 1.5.7 and carries #546/#547 already on main).
#549 — synthesis routed
openrouter/anthropic/*to the Anthropic providerRoot cause was deeper than the issue guessed: the structured-output engine's final-strike escalation fell back to a bare
sonnetalias resolving to the direct Anthropic provider (demandingANTHROPIC_API_KEY). Panelist calls usually succeed first-try so never tripped it; synthesis's heavier schema did. Fix keeps escalation on the same provider (openrouter/*→openrouter/anthropic/claude-sonnet-4.5). Also: failed synthesis no longer silently persistssynthesis: {}— it surfaces a warning +synthesis_error, setsrun_invalid, exits 2.#550 — silent attachment-fetch degradation
Failed/blocked URL fetch now raises by default (named URL + reason), is recorded as a failed response (counted in the failure rate), with
--allow-empty-attachmentsopt-out and per-responseattachment_fetch_status. Loopback/SSRF block documented in the attachments cookbook.Release
__version__.pypre-bumped to 1.5.7 + the three canonical artifact renders, so auto-tag tags cleanly on merge (no main push).Verification
Full local gate: 3109 passed / 1 skipped, 87% coverage; ruff + mypy clean. CI green across 3.10–3.14.
🤖 Generated with Claude Code