Skip to Content
Rius

How do I migrate from Helicone to Rius?

Rius replaces the Helicone proxy or async logger with the Rius SDK, which traces your LLM client inside your process, so migrating is a small code change. You add rius.init(), move your Helicone session, user and property headers onto Rius sessions, users and span attributes, and run both tools side by side until the numbers match. The full walkthrough is in Migrate from Helicone to Rius.

How it works

Helicone is mainly a proxy. Your client sends each request through a Helicone base URL, and Helicone logs it on the way through. Rius is OpenTelemetry-based. The Rius SDK instruments your provider client in your process and exports spans, one record per step such as an LLM call, so nothing sits between your code and the provider.

What stays

  • Your provider client code and your provider keys. Rius never holds provider keys.
  • The Helicone gateway, if you rely on caching, rate limits, retries or fallbacks. The Rius integrations patch the client library, not the network path, so calls are traced whatever base URL the client uses.

What changes

  • You add rius.init() at startup.
  • If you used the async logger, you remove it and call rius.init() instead.
  • The Helicone-* headers map to Rius equivalents:
    • Helicone-Session-Id becomes rius.session() (withSession in TypeScript).
    • Helicone-Session-Path becomes nested spans. The tree comes from your code’s call structure, not a path string.
    • Helicone-User-Id becomes rius.user() (withUser in TypeScript).
    • Helicone-Property-* becomes span or resource attributes.
    • Helicone-Omit-Request and Helicone-Omit-Response become capture_content=False, which strips prompts and completions at export while metadata still flows.

Set it up

  1. Create a Rius workspace and API key, then install the SDK with the extras for the providers you call. The export line sets your key.

    pip install "glassflow-rius[openai,anthropic]" export RIUS_API_KEY="ri_..."
  2. Replace the Helicone setup with rius.init(). For the proxy or AI Gateway, point the client back at the provider’s default base URL and drop the Helicone-Auth header. For the async logger, remove it rather than running both in one process, because both register the process-wide OpenTelemetry tracer provider and only the first registration is kept.

    import rius from openai import OpenAI from anthropic import Anthropic rius.init(service_name="my-agent") # reads RIUS_API_KEY openai_client = OpenAI() # default base URL, OPENAI_API_KEY anthropic_client = Anthropic() # default base URL, ANTHROPIC_API_KEY

    In TypeScript, call init from @glassflow-ai/rius and await rius.ready before the first call. If you use the AI Gateway with Helicone-managed provider keys or credits, switch to your own provider keys first, or the calls fail.

  3. Move sessions and users onto scopes. Every span inside a scope, including the auto-instrumented LLM call, carries session.id and user.id.

    with rius.session(session_id): with rius.start_as_current_span("support_ticket"): response = openai_client.chat.completions.create( model="gpt-4o-mini", messages=messages, )
  4. Carry over custom properties as attributes. Set per-request values, such as a ticket id, on the span that wraps the work. Set per-deployment values, such as app version or region, on the resource with the standard OpenTelemetry OTEL_RESOURCE_ATTRIBUTES variable. Keep each environment in its own workspace with its own API key.

  5. If you keep the gateway, leave the Helicone base URL and headers in place for now. Use plain model names such as gpt-4o-mini, not the gateway’s gpt-4o-mini/openai form, or calls show tokens but no cost.

  6. Check the result:

    • One call appears end to end, under the agent named by your service_name.
    • The generation shows the model and token counts, and cost appears.
    • The session and user show on the trace.
    • After a few days on the same traffic, request counts, token totals and cost line up. While the gateway stays in place, Rius cost runs higher than Helicone’s by your cache-hit share, because Rius prices a cached response from its token counts.
  7. When the numbers match, remove the Helicone base URL, the Helicone-* headers and the async logger. Move any dashboards or alerts that read from Helicone, then revoke the Helicone API key.

What you get

  • Traces with the full tree of agent, tool, retrieval and model steps, not LLM requests only.
  • Sessions, a Users page with each user’s traces, failures, error rate and cost, and cost computed by Rius from the model and token counts.
  • Rule-based alerts with webhook, email and Slack channels.
  • With the Rius SDK, a view of which agent processes are alive, and with partial spans turned on, runs still in progress.
  • An MCP server so your coding agent can query production traces.

History does not move. Existing traces stay in Helicone, and Rius starts from the first span you send it.

When something else fits

  • If caching, rate limits, retries or fallbacks are load-bearing in production, keep the Helicone gateway and add Rius next to it first. Rius is not a gateway, so those features stay with whatever serves them today.
  • If you depend on prompt management, scores, feedback, datasets or evals, keep those workflows in your current tool, since Rius does not offer them.
  • For other source tools, or code that already emits OpenTelemetry, see Migrate to Rius.

Still stuck? Get help

Last updated on