Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix(api): type read-side metadata on traces, observations and scores as objects (#18122)

Niklas Semmler9a29212e855c
diff --git a/fern/apis/server/definition/commons.yml b/fern/apis/server/definition/commons.yml
index 1e412f4424..a680240a34 100644
--- a/fern/apis/server/definition/commons.yml
+++ b/fern/apis/server/definition/commons.yml
@@ -49,8 +49,8 @@ types:
type: nullable<string>
docs: The user identifier associated with the trace
metadata:
- type: optional<unknown>
- docs: The metadata associated with the trace. Can be any JSON.
+ type: optional<map<string, unknown>>
+ docs: The metadata associated with the trace. Values can be any JSON; non-object metadata sent at ingestion is returned under the `metadata` key.
tags:
type: list<string>
docs: The tags associated with the trace.
@@ -148,7 +148,7 @@ types:
type: nullable<string>
docs: The version of the observation
metadata:
- type: unknown
+ type: map<string, unknown>
docs: Additional metadata of the observation
output:
type: unknown
@@ -309,7 +309,7 @@ types:
# Metadata fields (field group: metadata)
metadata:
- type: optional<unknown>
+ type: optional<map<string, unknown>>
docs: Additional metadata of the observation
# Model fields (field group: model)
@@ -454,7 +454,7 @@ types:
type: nullable<string>
docs: Comment on the score
metadata:
- type: unknown
+ type: map<string, unknown>
docs: Metadata associated with the score
configId:
type: nullable<string>
@@ -539,7 +539,7 @@ types:
type: nullable<string>
docs: Comment on the score
metadata:
- type: unknown
+ type: map<string, unknown>
docs: Metadata associated with the score
configId:
type: nullable<string>
diff --git a/web/public/generated/api/openapi.yml b/web/public/generated/api/openapi.yml
index cebaa95437..354e83ff3b 100644
--- a/web/public/generated/api/openapi.yml
+++ b/web/public/generated/api/openapi.yml
@@ -9868,8 +9868,13 @@ components:
nullable: true
description: The user identifier associated with the trace
metadata:
+ type: object
+ additionalProperties: true
nullable: true
- description: The metadata associated with the trace. Can be any JSON.
+ description: >-
+ The metadata associated with the trace. Values can be any JSON;
+ non-object metadata sent at ingestion is returned under the
+ `metadata` key.
tags:
type: array
items:
@@ -10043,6 +10048,8 @@ components:
nullable: true
description: The version of the observation
metadata:
+ type: object
+ additionalProperties: true
description: Additional metadata of the observation
output:
description: The output data of the observation
@@ -10301,6 +10308,8 @@ components:
nullable: true
description: The output data of the observation
metadata:
+ type: object
+ additionalProperties: true
nullable: true
description: Additional metadata of the observation
model:
@@ -10557,6 +10566,8 @@ components:
nullable: true
description: Comment on the score
metadata:
+ type: object
+ additionalProperties: true
description: Metadata associated with the score
configId:
type: string
@@ -10748,6 +10759,8 @@ components:
nullable: true
description: Comment on the score
metadata:
+ type: object
+ additionalProperties: true
description: Metadata associated with the score
configId:
type: string