Skip to content

mock-server: add list runs endpoint for OpenAI assistants - #199

Open
lmolkova wants to merge 1 commit into
open-telemetry:mainfrom
lmolkova:mock-assistants-list-runs
Open

lmolkova wants to merge 1 commit into
open-telemetry:mainfrom
lmolkova:mock-assistants-list-runs

Conversation

@lmolkova

@lmolkova lmolkova commented Sep 13, 2026

Copy link
Copy Markdown
Member

Add GET /v1/threads/<thread_id>/runs (and the openai/ and bare /threads/ route prefixes) to the mock server.

Returns a list of runs associated with the given thread, falling back to a default completed run if none have been tracked in memory yet.

Related: open-telemetry/semantic-conventions-genai#513

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The added test does not verify deterministic response bytes or the endpoint’s run-listing semantics.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds OpenAI Assistants run-listing support to the GenAI mock server.

Changes:

  • Adds three route-prefix variants for listing thread runs.
  • Returns tracked runs or a default completed run.
  • Registers the endpoint in mock-server tests.
File summaries
File Description
assistants.py Implements run listing and fallback response.
test_mock_server.py Adds the endpoint to parametrized tests.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tools/gen-ai/mock-server/tests/test_mock_server.py
@lmolkova
lmolkova force-pushed the mock-assistants-list-runs branch from a076a9d to 6c583a4 Compare September 13, 2026 22:39
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Sep 13, 2026

Copy link
Copy Markdown

Pull request dashboard status

Waiting on reviewers · refreshed 2026-09-17 06:53 UTC

Review the latest changes.

Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

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.

2 participants