From b80e37bea4be802052915f1ba73c2190f43ad45f Mon Sep 17 00:00:00 2001 From: langfuse-bot Date: Wed, 18 Feb 2026 11:32:24 +0000 Subject: [PATCH] feat(api): update API spec from langfuse/langfuse 8c1e50a --- langfuse/api/reference.md | 13 +++++++++++-- langfuse/api/resources/observations_v_2/client.py | 10 ++++++---- langfuse/api/resources/score_v_2/client.py | 10 ++++++++++ 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/langfuse/api/reference.md b/langfuse/api/reference.md index 8a8dad23c..ea094fce8 100644 --- a/langfuse/api/reference.md +++ b/langfuse/api/reference.md @@ -3743,8 +3743,9 @@ Example: "key1,key2" **parse_io_as_json:** `typing.Optional[bool]` -Set to `true` to parse input/output fields as JSON, or `false` to return raw strings. -Defaults to `false` if not provided. +**Deprecated.** Setting this to `true` will return a 400 error. +Input/output fields are always returned as raw strings. +Remove this parameter or set it to `false`. @@ -7207,6 +7208,14 @@ client.score_v_2.get()
+**filter:** `typing.Optional[str]` — A JSON stringified array of filter objects. Each object requires type, column, operator, and value. Supports filtering by score metadata using the stringObject type. Example: [{"type":"stringObject","column":"metadata","key":"user_id","operator":"=","value":"abc123"}]. Supported types: stringObject (metadata key-value filtering), string, number, datetime, stringOptions, arrayOptions. Supported operators for stringObject: =, contains, does not contain, starts with, ends with. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
diff --git a/langfuse/api/resources/observations_v_2/client.py b/langfuse/api/resources/observations_v_2/client.py index ea9599c69..fc48a6a53 100644 --- a/langfuse/api/resources/observations_v_2/client.py +++ b/langfuse/api/resources/observations_v_2/client.py @@ -90,8 +90,9 @@ def get_many( Base64-encoded cursor for pagination. Use the cursor from the previous response to get the next page. parse_io_as_json : typing.Optional[bool] - Set to `true` to parse input/output fields as JSON, or `false` to return raw strings. - Defaults to `false` if not provided. + **Deprecated.** Setting this to `true` will return a 400 error. + Input/output fields are always returned as raw strings. + Remove this parameter or set it to `false`. name : typing.Optional[str] @@ -364,8 +365,9 @@ async def get_many( Base64-encoded cursor for pagination. Use the cursor from the previous response to get the next page. parse_io_as_json : typing.Optional[bool] - Set to `true` to parse input/output fields as JSON, or `false` to return raw strings. - Defaults to `false` if not provided. + **Deprecated.** Setting this to `true` will return a 400 error. + Input/output fields are always returned as raw strings. + Remove this parameter or set it to `false`. name : typing.Optional[str] diff --git a/langfuse/api/resources/score_v_2/client.py b/langfuse/api/resources/score_v_2/client.py index 7372a7784..bce290023 100644 --- a/langfuse/api/resources/score_v_2/client.py +++ b/langfuse/api/resources/score_v_2/client.py @@ -48,6 +48,7 @@ def get( data_type: typing.Optional[ScoreDataType] = None, trace_tags: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, fields: typing.Optional[str] = None, + filter: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetScoresResponse: """ @@ -115,6 +116,9 @@ def get( fields : typing.Optional[str] Comma-separated list of field groups to include in the response. Available field groups: 'score' (core score fields), 'trace' (trace properties: userId, tags, environment). If not specified, both 'score' and 'trace' are returned by default. Example: 'score' to exclude trace data, 'score,trace' to include both. Note: When filtering by trace properties (using userId or traceTags parameters), the 'trace' field group must be included, otherwise a 400 error will be returned. + filter : typing.Optional[str] + A JSON stringified array of filter objects. Each object requires type, column, operator, and value. Supports filtering by score metadata using the stringObject type. Example: [{"type":"stringObject","column":"metadata","key":"user_id","operator":"=","value":"abc123"}]. Supported types: stringObject (metadata key-value filtering), string, number, datetime, stringOptions, arrayOptions. Supported operators for stringObject: =, contains, does not contain, starts with, ends with. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -164,6 +168,7 @@ def get( "dataType": data_type, "traceTags": trace_tags, "fields": fields, + "filter": filter, }, request_options=request_options, ) @@ -286,6 +291,7 @@ async def get( data_type: typing.Optional[ScoreDataType] = None, trace_tags: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, fields: typing.Optional[str] = None, + filter: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> GetScoresResponse: """ @@ -353,6 +359,9 @@ async def get( fields : typing.Optional[str] Comma-separated list of field groups to include in the response. Available field groups: 'score' (core score fields), 'trace' (trace properties: userId, tags, environment). If not specified, both 'score' and 'trace' are returned by default. Example: 'score' to exclude trace data, 'score,trace' to include both. Note: When filtering by trace properties (using userId or traceTags parameters), the 'trace' field group must be included, otherwise a 400 error will be returned. + filter : typing.Optional[str] + A JSON stringified array of filter objects. Each object requires type, column, operator, and value. Supports filtering by score metadata using the stringObject type. Example: [{"type":"stringObject","column":"metadata","key":"user_id","operator":"=","value":"abc123"}]. Supported types: stringObject (metadata key-value filtering), string, number, datetime, stringOptions, arrayOptions. Supported operators for stringObject: =, contains, does not contain, starts with, ends with. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -410,6 +419,7 @@ async def main() -> None: "dataType": data_type, "traceTags": trace_tags, "fields": fields, + "filter": filter, }, request_options=request_options, )