Repository navigation
docs(api): document metadata is set / is not set filter operators - #1946
Conversation
Regenerated langfuse/api from the upstream Fern definition: baseline langfuse/langfuse 619dbe3 (last sync, #1866) plus langfuse/langfuse#17357 and #18404. Split out of the bundled API-spec bot PR #1943. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@claude review |
There was a problem hiding this comment.
Claude Code Review
No review was started: this request came from a bot account. Manual reviews can only be requested by someone with write access to this repository. Ask a maintainer to comment @claude review, or have your automation post the comment from a user account with write access.
Tip: disable this comment in your organization's Code Review settings.
There was a problem hiding this comment.
LGTM — straightforward generated-client update. Checked the new EvaluationRuleStringObjectFilterOperator enum, its wiring into the three dynamic-import tables (consistent TYPE_CHECKING import, _dynamic_imports entry, all entry across langfuse/api/init.py, evaluation_commons/init.py, types/init.py), and the two model fields (EvaluationRuleFilter_StringObject.operator, StringObjectEvaluationRuleFilter.operator) now typed with it, plus matching docstring updates.
Extended reasoning...
Diff is an auto-generated Fern API client update: adds one new StrEnum (evaluation_rule_string_object_filter_operator.py), wires it into three init.py dynamic-import tables, retypes two operator fields from the generic string enum to the new superset enum, and updates docstrings/comments in several other generated clients to mention the new is-set/is-not-set operators. No hand-written logic, no auth/crypto/injection surface, and the wiring follows the existing repeated pattern correctly and consistently; PR author notes no runtime breaking changes since the new enum is a superset. No open third-party objections in the timeline.
What does this PR do?
Split out of #1943 (the bot sync from langfuse/langfuse
4e733d0), so that each upstream API definition change can be reviewed and merged on its own. Regeneratedlangfuse/apifrom the last synced spec (langfuse/langfuse619dbe3) with only this upstream change applied, using the same post-processing assdk-api-spec.yml.Upstream: langfuse/langfuse#17357, langfuse/langfuse#18404. JS counterpart: langfuse/langfuse-js#989.
is set/is not setmetadata key presence operators in thefilterdocs of traces, observations (v1 and v2) and scores.EvaluationRuleStringObjectFilterOperator(the string operators plusis set/is not set) and uses it forStringObjectEvaluationRuleFilter.operatorandEvaluationRuleFilter_StringObject.operator.Breaking changes
No breaking changes at runtime. The new enum is a superset of
EvaluationRuleStringFilterOperator, so response validation only gets looser: before, a rule usingis setwould have failed to validate. Old enum values passed to the field are still accepted at runtime and compare equal. Type-level only:EvaluationRuleStringFilterOperatorto this field, andisinstancechecks against the old enum now return False.operator.visit(...)now requiresis_set/is_not_sethandlers.Both are unlikely in practice.
Type of change
Verification
The 18 errors are all in
tests/unit/test_prompt.py(Langfuse client is not initialized) and reproduce identically on unmodifiedmainlocally, so they are environmental and not caused by this diff.Skipped:
tests/e2eandtests/live_provider, because no Langfuse server or provider credentials were available locally.Generation was checked against the bot output: regenerating langfuse/langfuse
619dbe3(the last synced spec, #1866) with the same steps assdk-api-spec.ymlreproducesmainexactly, and regenerating4e733d0reproduces #1943 byte-for-byte.scripts/patch_generated_score_compat.pyran and is a no-op on this tree.Checklist
code_review.md..env.templateif needed. (n/a)Release info
Bump level: patch (ships in the current 4.x major).
🤖 Generated with Claude Code
🤖 Written by Claude (an AI agent) on behalf of Niklas
The PR appears safe to merge, with no actionable issues found.
What we checked:
Summary
Adds
EvaluationRuleStringObjectFilterOperatorwithis setandis not set, uses it in both string-object filter models, and exports it through the public API packages.niklassemmlerexplicitly acknowledged changes to old-enum type checks and the extravisithandlers. These were not reported because they are known compatibility changes.Reviews (1) · Last reviewed commit: "docs(api): document metadata is set / is..." · Reviewed by Greptile