Skip to content

feat(api): update API spec from langfuse/langfuse 9a75785 - #2120

Closed
langfuse-bot wants to merge 1 commit into
mainfrom
api-spec-bot-9a75785-42828736527-1
Closed

langfuse-bot wants to merge 1 commit into
mainfrom
api-spec-bot-9a75785-42828736527-1

Conversation

@langfuse-bot

@langfuse-bot langfuse-bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Generated from langfuse/langfuse main at 9a75785.

RetriggerView in GreptileConfidence Score: 4/5

The blob storage response model needs a backward-compatible default before merging.

Summary

Updates the generated SDK from the latest API definition.

  • S3 integrations can authenticate with an AWS role instead of access keys.
  • Topics callers can read rules, trace summaries, and topic assignments.
  • Observation queries explain how filters and cursor pages work.
  • Model docs mark tokenizer settings as legacy compatibility fields.

Reviews (1) · Last reviewed commit: "feat(api): update API spec from langfuse..." · Reviewed by Greptile

@github-actions

Copy link
Copy Markdown

@claude review

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +28 to +30
auth_type: typing_extensions.Annotated[
BlobStorageIntegrationAuthType, FieldMetadata(alias="authType")
]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Callers on a self-hosted Langfuse server older than the authType release would get a ValidationError from every blob storage get, list or upsert, where the base parsed fine. New response fields are declared required with no default. Fix: give every newly added response field a default (= None for auth_type, an empty list for rule_ids), which covers the 2 sites listed. Same pattern at 2 sites (blob_storage_integration_response.py:28, unstable/topics/types/topic_facet.py:22).

Why this was flagged

This only matters if a caller upgrades the SDK while pointing at a Langfuse server that does not yet send authType or ruleIds, such as a self-hosted deployment that predates langfuse/langfuse 9a75785. BlobStorageIntegrationResponse.auth_type (blob_storage_integration_response.py:28-30) is annotated BlobStorageIntegrationAuthType with no default, so it is required. The raw client decodes 2xx bodies with parse_obj_as (core/pydantic_utilities.py:53-60), which calls TypeAdapter.validate_python. A body without authType therefore raises a pydantic ValidationError instead of returning data. On the base branch the same responses parse, because the field did not exist. TopicFacet.rule_ids (topic_facet.py:22-24) is also required via pydantic.Field(), so list_facets/get_facet fail the same way against servers without ruleIds. Nothing else guards against the missing key.

Verification: blob_storage_integration_response.py adds auth_type with no = ... default, so the field is required. topic_facet.py adds rule_ids: ... = pydantic.Field(), which is also required. In the base file this field does not exist, so the base parsed these responses fine. parse_obj_as (core/pydantic_utilities.py:53-60) raises a pydantic ValidationError when a required field is missing.

Comment on lines +28 to +30
auth_type: typing_extensions.Annotated[
BlobStorageIntegrationAuthType, FieldMetadata(alias="authType")
]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Older server responses fail

If a self-hosted server predates authType, the newly required auth_type field makes parse_obj_as raise ValidationError on its response. Listing integrations fails, and an upsert can save successfully before the client raises an error—even when callers use only access keys.

Give the new response field a backward-compatible default so upgrading the SDK does not require upgrading the server.

Prompt To Fix With AI
This is a comment left during a code review.
Path: langfuse/api/blob_storage_integrations/types/blob_storage_integration_response.py
Line: 28-30

Comment:
**Older server responses fail**

If a self-hosted server predates `authType`, the newly required `auth_type` field makes `parse_obj_as` raise `ValidationError` on its response. Listing integrations fails, and an upsert can save successfully before the client raises an error—even when callers use only access keys.

Give the new response field a backward-compatible default so upgrading the SDK does not require upgrading the server.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

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.

1 participant