Skip to content

Add custom evaluation metrics OpenAPI endpoints#1196

Merged
DO-rrao merged 4 commits into
digitalocean:mainfrom
sshirolkar:sshirolkar/custom-metrics
Jul 1, 2026
Merged

Add custom evaluation metrics OpenAPI endpoints#1196
DO-rrao merged 4 commits into
digitalocean:mainfrom
sshirolkar:sshirolkar/custom-metrics

Conversation

@sshirolkar

Copy link
Copy Markdown
Contributor

Summary

  • add OpenAPI operations for custom evaluation metrics create/update/delete under the GenAI section
  • align request/response schemas and shared metric fields with the Cthulhu proto-generated contract
  • add curl examples for create, update (path metric UUID), and delete (path metric UUID)

Test plan

  • Run npm run lint -- specification/DigitalOcean-public.v2.yaml
  • Confirm no linter errors in modified files via IDE diagnostics
  • Verify branch diff is scoped to custom metric OpenAPI files only

Made with Cursor

Comment thread specification/resources/gen-ai/definitions.yml
Comment thread specification/resources/gen-ai/definitions.yml Outdated
@sshirolkar sshirolkar force-pushed the sshirolkar/custom-metrics branch from 597212b to 6ed5ff7 Compare June 30, 2026 21:55
sshirolkar and others added 2 commits June 30, 2026 14:57
Address review feedback: created_at, updated_at, and deleted_at in the
shared apiCustomEvaluationMetricConfig schema are server-assigned, so mark
them readOnly so they only surface on responses and are not treated as
client-settable on create/update requests.

Co-authored-by: Cursor <cursoragent@cursor.com>
Address review feedback: drop the internal Figma reference from
add_to_library and reword deleted_at and the associated_presets/preset
schema descriptions in terms of what the API consumer sees rather than
internal dashboard/picker behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
sshirolkar added a commit to sshirolkar/godo that referenced this pull request Jun 30, 2026
Adds the EvaluationMetricSource enum and Source field to align with the
custom evaluation metrics OpenAPI contract (digitalocean/openapi#1196),
so the SDK no longer drops `source` from API responses. This lets
consumers distinguish custom metrics from built-in ones.

Co-authored-by: Cursor <cursoragent@cursor.com>
The add_to_library field was removed from the cthulhu CustomEvaluationMetricConfig
contract (reserved as of commit adb2d389); every custom metric is now persisted.
Drop the property from apiCustomEvaluationMetricConfig and from the create/update
curl examples to keep the spec in sync with the source-of-truth proto.

Co-authored-by: Cursor <cursoragent@cursor.com>
DO-rrao added a commit to digitalocean/godo that referenced this pull request Jul 1, 2026
* add support for custom metrics rpcs

* address review comments

* add source field to EvaluationMetric

Adds the EvaluationMetricSource enum and Source field to align with the
custom evaluation metrics OpenAPI contract (digitalocean/openapi#1196),
so the SDK no longer drops `source` from API responses. This lets
consumers distinguish custom metrics from built-in ones.

Co-authored-by: Cursor <cursoragent@cursor.com>

* remove add_to_library from CustomEvaluationMetricConfig

The add_to_library field was removed from the cthulhu contract (every
custom metric is now persisted), so drop it from the SDK struct, the
test fixture, and the related assertions to stay in sync with the
source of truth.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Radhika Rao <rrao@digitalocean.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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