Skip to content

v1.5.7: synthesis provider routing (#549) + fail-loud on empty attachments (#550) + release bump#551

Merged
the-data-viking merged 2 commits into
mainfrom
fix/549-550-synthesis-routing-and-empty-attachments
Jun 5, 2026
Merged

v1.5.7: synthesis provider routing (#549) + fail-loud on empty attachments (#550) + release bump#551
the-data-viking merged 2 commits into
mainfrom
fix/549-550-synthesis-routing-and-empty-attachments

Conversation

@claude-dataviking

@claude-dataviking claude-dataviking commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

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 provider

Root cause was deeper than the issue guessed: the structured-output engine's final-strike escalation fell back to a bare sonnet alias resolving to the direct Anthropic provider (demanding ANTHROPIC_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 persists synthesis: {} — it surfaces a warning + synthesis_error, sets run_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-attachments opt-out and per-response attachment_fetch_status. Loopback/SSRF block documented in the attachments cookbook.

Release

__version__.py pre-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.

Follow-up (not in this PR): the 2a auto-bump workflow so future releases don't need a manual pre-bump — landing as its own PR (it needs a bot PAT so the auto-commit re-triggers required checks).

🤖 Generated with Claude Code

… 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>
@claude-dataviking claude-dataviking added the semver:patch Bump patch version on merge label Jun 4, 2026
@claude-dataviking

Copy link
Copy Markdown
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 main ruleset requires a CODEOWNERS review and I'm the author, so I can't self-approve or merge. Please review/merge; the semver:patch label will auto-cut the next patch (v1.5.8) on merge.

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>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 4, 2026

Copy link
Copy Markdown

Deploying synthpanel with  Cloudflare Pages  Cloudflare Pages

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

View logs

@claude-dataviking claude-dataviking changed the title fix(synthesis,fetch): route openrouter/* synthesis correctly (#549) + fail loudly on empty attachment fetch (#550) v1.5.7: synthesis provider routing (#549) + fail-loud on empty attachments (#550) + release bump Jun 4, 2026
@the-data-viking the-data-viking merged commit e95a970 into main Jun 5, 2026
19 checks passed
@the-data-viking the-data-viking deleted the fix/549-550-synthesis-routing-and-empty-attachments branch June 5, 2026 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver:patch Bump patch version on merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants