Skip to content

feat(agentstudio): add experimental evaluation metrics read - #306

Open
leonardocuco wants to merge 4 commits into
feat/cec-1883-agent-studio-routingfrom
feat/cec-1883-evals-metrics
Open

leonardocuco wants to merge 4 commits into
feat/cec-1883-agent-studio-routingfrom
feat/cec-1883-evals-metrics

Conversation

@leonardocuco

@leonardocuco leonardocuco commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The CLI cannot read Agent Studio evaluation metrics, and the evaluation routes are excluded from the production public OpenAPI schema in the inspected backend snapshot.

Change

Add an explicitly experimental agentstudio evals metrics list using the existing SDK custom transport, the settings ACL and a required explicit --base-url. Preserve JSON numeric precision and redact credentials and response data in relevant error paths.

This draft is a concrete implementation proposal, not a claim that the evaluations API is public or stable. Do not merge or publish until the owning teams decide its exposure, supported environments, contract and ownership (D2).

Verification

  • go test ./..., go generate ./..., go build ./..., gofumpt and git diff --check.
  • Mocked tests cover routing, query encoding, ACL, 403, malformed responses, large numbers and error redaction. No real API calls.

Stacked on #302; retarget after C3 merges. Related to CEC-1883 (C8). No deployment or release during the code freeze.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-01T16:27:49.514631Z 548adfe Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Fall back to a string `detail` field when the error body has no `message`,
so FastAPI-style 4xx responses explain the failure. Attach the safeObject
doc comment to the right declaration.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@leonardocuco

Copy link
Copy Markdown
Contributor Author

Claude Code reviewed this change at 548adfe for the author: 6 findings, 2 fixed.

  • pkg/cmd/evals/internal/evalsapi/get.go:42: error responses lost the server's explanation unless the body had a string message. Fixed in 6ac3873 by falling back to a string detail, with a test.
  • pkg/cmd/evals/internal/evalsapi/get.go:69: doc comment sat on the wrong declaration. Fixed in 6ac3873.
  • pkg/cmd/evals/evals.go:11: help text omits that --base-url also needs explicit --search-hosts, and the ACL preflight runs before the missing-flag error. Left: a nit, for the author.
  • pkg/cmd/evals/metrics/list/list.go:12: does not follow the repo command conventions (options struct, runner, example, import grouping). Left: a nit, for the author.
  • pkg/cmd/evals/internal/evalsapi/get.go:24: Get passes path unescaped. Left: the only caller uses a constant path, so nothing is affected today.
  • pkg/cmd/evals/evals_test.go:19: no test covers the real --base-url plus --search-hosts ACL path. Left: a nit, for the author.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant