Skip to content

Expose OpenRouter's response id; allow session and trace data #19

Description

@DevMortimer

Wanted

Three things on the OpenRouter backend:

  1. Response id. Each evaluation returns OpenRouter's id (for example gen-dec-...), along with provider and the dated model it served, once they are validated. The TypeSafe backend returns neither id nor provider, so these fields are optional.
  2. Session and trace data. Callers can forward session_id (a string of at most 256 characters) and metadata (the trace keys trace_id, trace_name, span_name, generation_name, parent_span_id) (request reference). The request schema rejects unknown keys today, so this needs explicit, validated options, sent only to OpenRouter.
  3. Context window. Document that Jev on OpenRouter has a 32,000-token context window, next to the byte-based maxInputBytes limit.

Nothing from upstream reaches a caller without validation, and error messages never contain submitted state or response bodies.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions