Skip to content

chore(openrouter): add dedicated Python SDK tracing - #547

Open
nik13 wants to merge 7 commits into
devfrom
chore/openrouter-python-instrumentation
Open

nik13 wants to merge 7 commits into
devfrom
chore/openrouter-python-instrumentation

Conversation

@nik13

@nik13 nik13 commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add installable traceAI-openrouter for the dedicated Speakeasy Python SDK (not an OpenAI subclass). Covers synchronous and asynchronous Chat, Embeddings, Responses and deprecated beta.responses, including streaming usage and error status.
  • Attribute the official OpenAI-compatible openrouter.ai host to OpenRouter while leaving look-alike hosts as OpenAI.
  • Register release automation and loopback-only CI at the declared floor (SDK 1.3.0 / Python 3.10) and current release (SDK 1.3.107 / Python 3.13).

Verification

  • On current dev, provider_from_host("openrouter.ai") returned openai; after change, host contract tests cover the genuine host and look-alikes.
  • Synthetic HTTPX transports: 68 tests passed against Python 3.13 + SDK 1.3.107, including existing OpenAI provider contracts; 11 package tests passed on a clean wheel install with Python 3.10 + SDK 1.3.0.
  • Release plan check and wheel/sdist builds pass. No vendor credentials or external API calls.

Release and documentation

  • New Python package cannot publish until the PyPI new-project limit clears. Customer-facing page is staged locally and is not submitted to docs while this package is unpublished. Existing OpenAI-client and Broadcast docs remain available; using multiple routes for the same call duplicates observations.
  • Streaming spans finish when consumed or explicitly closed; early close is marked incomplete and does not claim a complete answer. Prompt text defaults to on per TraceConfig, with hide flags. No embedding vectors or error bodies are captured.

E2E coverage

Not applicable: no product application routes, migrations, or frontend behavior changed. Package-level real SDK fake-transport contracts are in this PR.

🤖 Generated with Claude Code

nik13 and others added 7 commits November 2, 2026 15:55

This branch has not been deployed

No deployments
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