Send the conversation id as agent-session-id on pi's model calls

Open
#127 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
go
Domain
api, backend

Research direction

Start with internal/chatbridge/pi.go:42 to see how Tapas passes the conversation id to pi, then inspect pi’s javo provider configuration and extension options for request headers. Follow one model call to Tapas’s agent endpoint and check whether a fixed agent-session-id reaches the proxy before investigating per-session headers and what Claude Code sends. Done means model calls carry the conversation id and it meets the stated character and length checks.

Written by the indexing model from the issue text.

Description

We're adding OpenTelemetry tracing to model calls that go through the LLM serving pack's gateway (nebari-dev/llm-serving-pack#315). Envoy AI Gateway maps an agent-session-id request header to session.id on its spans, which is how every model call from one conversation gets tied together in Grafana. Separately, Tapas's agent proxy will start passing a checked agent-session-id through to the provider when the agent sends one.

No agent sends it today. The chat bridge already starts pi with the conversation id as --session-id (internal/chatbridge/pi.go:42), so pi knows the value. It just doesn't put it on its model calls to the javo provider.

What we need

  • pi sends the conversation id as agent-session-id on every chat completions call to Tapas's agent endpoint.
  • We need to work out whether pi's provider config or one of its extensions can set a per-session header, and what Claude Code would send, if anything.

First check

Set a fixed header on pi's javo provider in a workspace pod and confirm it reaches Tapas on one request. If that works, the per-session value is the remaining piece.

Done when

  • A chat in Tapas produces model calls that carry agent-session-id equal to the conversation id.
  • The value passes the proxy's check (1 to 128 characters of A-Z a-z 0-9 . _ : -).
Dominant language
Go
Stars
5
Forks
0
Avg merge
21h 13m
Merged PRs (30d)
53

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nebari-dev/tapas

All issues in nebari-dev/tapas

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.