Skip to content

v1.6.1: fix live design crash (llm_call telemetry to stdlib logger)#69

Merged
xmpuspus merged 1 commit into
mainfrom
hotfix/v1.6.1-llm-telemetry-crash
Jul 8, 2026
Merged

v1.6.1: fix live design crash (llm_call telemetry to stdlib logger)#69
xmpuspus merged 1 commit into
mainfrom
hotfix/v1.6.1-llm-telemetry-crash

Conversation

@xmpuspus

@xmpuspus xmpuspus commented Jul 8, 2026

Copy link
Copy Markdown
Owner

What

Hotfix for a ship-blocking crash the July 2026 product audit surfaced.

cloudwright design (and non-stream modify) crashed on a live API key with:

TypeError: Logger._log() got an unexpected keyword argument 'model'

The per-call telemetry line passed structlog-style kwargs (model=, tokens=, ...) to the stdlib logger returned by get_logger(). The CLI enables root INFO via configure_logging(), so the call raised right after the model responded and tokens were billed, producing no spec.

Latent since v1.1.0: pytest leaves the root logger at WARNING, so info() short-circuits and the line never emitted or crashed under tests. Demos use mock LLMs; release smoke tests run keyless. Three masks aligned.

Fix

Both the Anthropic and OpenAI providers now format the llm_call line with %-style stdlib logging. Side effect: per-call LLM telemetry (model, latency, tokens, cache hits) now actually emits.

Test

packages/core/tests/test_llm_telemetry_logging.py runs both providers under configure_logging() (root at INFO) and asserts no crash. Confirmed RED before the fix, GREEN after. Full core suite 1372 passed at CI parity. A fresh-context adversarial review cleared the placeholder/arg counts, logger type, and test coverage.

Version bumped to 1.6.1 across all four packages, core extras pins, and server.json.

Reviewed by Xavier Puspus

…r (v1.6.1)

The per-call telemetry log passed structlog-style kwargs (model=, tokens=, ...)
to the stdlib logger returned by get_logger(). Under the CLI, which enables root
INFO via configure_logging(), this raised
  TypeError: Logger._log() got an unexpected keyword argument 'model'
right after the model responded and tokens were billed, so every live
`cloudwright design`/`modify` produced a traceback and no spec.

Latent since v1.1.0: pytest leaves the root logger at WARNING, so info() short-
circuits and the line never emitted or crashed under tests. Switch both the
Anthropic and OpenAI providers to %-style stdlib formatting. Side effect: LLM
telemetry (model, latency, tokens, cache hits) now actually emits.

Regression: test_llm_telemetry_logging.py runs both providers under
configure_logging() and asserts no crash.
@xmpuspus
xmpuspus merged commit c2ce777 into main Jul 8, 2026
4 checks passed
@xmpuspus
xmpuspus deleted the hotfix/v1.6.1-llm-telemetry-crash branch July 8, 2026 13:35
xmpuspus added a commit to xmpuspus/ai-workflow-benchmark that referenced this pull request Jul 8, 2026
awb run --dry-run paid the adapter auth preflight, a live model call
that can take 30 seconds; recording the demo surfaced it. The preview
now prints without touching the adapter, pinned by a test that makes
adapter resolution explode under --dry-run.

demos/from-pr.gif is a real vhs recording against a real merged PR
(xmpuspus/cloudwright#69): mine, inspect the pinned SHA and rubric,
validate, load with run --tasks-dir. Embedded in the README's
Benchmark Your Own Setup section.
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