v0.1.0-alpha.21 — Structured-output reliability + OTel observability hooks (additive) #49
baabakk
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Released 2026-06-18. Install:
pnpm add @llm-ports/core@alpha @llm-ports/adapter-openai@alpha @llm-ports/capabilities@alphaTwo coordinated themes. All additive, no breaking changes.
1. Structured-output reliability batch
Driven by ADW's 2026-06-18 LLM Provider Test Report. The 8-call-per-provider sweep showed DeepInfra + Parasail were the only cheap-tier providers dropping required fields on the first attempt — empirically grounded in three numbers: deepseek-flash 2/8 retries, gemma-31b 8/8 retries (one on every call), mimo-parasail 3/8 retries. All three drop to 0/8 retries with strict mode.
What shipped
strict?: booleanonGenerateStructuredOptions/StreamStructuredOptions. Adapters that don't implement strict mode silently ignore the hint. Plumbed through 5 capability factories.api.deepinfra.comandapi.parasail.io. Joins the existing list (OpenAI native, Cerebras, Groq, SambaNova).deepseek-ai/DeepSeek-V4-Flash,google/gemma-4-31B-it,XiaomiMiMo/MiMo-V2.5. No more parallelpricingOverridesfor these.isJsonModeRejectionmatcher fix from adapter-openai: strict-schema-rejection rescue trigger doesn't match OpenAI native's error pattern #46 (already in main as 9cb9a82; bundled here too).Closes
2. OTel-aligned observability hooks
Five hooks on
RegistryOptions.observability, aligned with OpenTelemetry'sgen_ai.*semantic conventions so downstream pipelines (Honeycomb, Datadog, OTel Collector, OTLP exporters) map them onto spans + metrics without re-deriving fields:All hooks sync OR async, errors swallowed (observability instrumentation can't break inference).
Emission coverage
onCostgenerateText/generateStructured/runAgentonTokenUsagegenerateText/generateStructured/runAgentonCacheHitcacheReadTokens > 0onFallbackwalkChainadvances from one alias to the nextonValidationRetryFor
onValidationRetrytoday: use the adapteronRetryhook and filter onreason === "validation-feedback". Stream methods don't emit cost yet (alpha.22 follow-up).Backwards compatibility
All additions are additive. Calls without
strict, registries withoutobservability, adapters against allowlisted baseURLs unchanged.Tests
What's next (alpha.22)
onValidationRetryRegistry-level emissiononCost/onTokenUsageFull release notes.
Beta Was this translation helpful? Give feedback.
All reactions