Skip to content

feat(api): update API spec from langfuse/langfuse 46d50a3 - #2037

Open
langfuse-bot wants to merge 1 commit into
mainfrom
api-spec-bot-46d50a3-39625941453-1
Open

langfuse-bot wants to merge 1 commit into
mainfrom
api-spec-bot-46d50a3-39625941453-1

Conversation

@langfuse-bot

@langfuse-bot langfuse-bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Generated from langfuse/langfuse main at 46d50a3.

RetriggerView in GreptileConfidence Score: 4/5

Fix the break in existing BlobStorageExportFieldGroup.visit() calls before merging.

Summary

Updates the generated API client from the latest supplied Langfuse specification.

  • Organization API callers can manage LLM connections shared with projects.
  • Skill calls use the regular client and can include file text inline.
  • Blob storage export groups can select score metadata and provenance.
  • Score-config names are documented with an 80-character limit.

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.

@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.

Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.

Comment on lines 51 to 53
self._dashboards = DashboardsClient(client_wrapper=self._client_wrapper)
return self._dashboards

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

馃煛 (optional) Code written against 5.0.x that calls client.unstable.skills or imports from langfuse.api.unstable.skills will fail on upgrade with AttributeError or ModuleNotFoundError. The skills property was removed from UnstableClient and AsyncUnstableClient. The langfuse/api/unstable/skills package was deleted, and no alias or deprecation shim was left behind. Fix: add a deprecated skills property on both unstable clients that returns the top-level SkillsClient or AsyncSkillsClient. Add a re-export so old unstable.skills imports still resolve, or ship the move as a documented breaking change.

Why this was flagged

The langfuse/api/unstable/skills package and the UnstableClient.skills property have been in place since commit f890d1f (v5 release), and pyproject.toml is at version 5.0.4, so released users have this path. The diff deletes skills from unstable/client.py (sync and async, around lines 51-53 and 89) and from _dynamic_imports and __all__ in langfuse/api/unstable/__init__.py. It also moves the whole package to langfuse/api/skills. After merging, LangfuseAPI(...).unstable.skills.list() raises AttributeError. from langfuse.api.unstable import SkillMeta raises AttributeError via the module __getattr__, and import langfuse.api.unstable.skills raises ModuleNotFoundError. On the base branch all of these work. Nothing in the repo provides a fallback alias. A repo-wide grep for unstable.skills finds no remaining shim. The PR description presents this as a routine spec update, not a breaking change.

Verification: Trigger: existing 5.0.x code that calls client.unstable.skills or imports from langfuse.api.unstable.skills is upgraded past this commit. In langfuse/api/unstable/client.py the diff removes the skills property from both UnstableClient (old lines 56-62) and AsyncUnstableClient (old lines 103-110). The package now lives at langfuse/api/skills, with no alias, re-export or deprecation property at the old path.

"""
_response = self._client_wrapper.httpx_client.request(
"api/public/unstable/skills",
"api/public/skills",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

馃煛 (optional) After upgrading, users on Langfuse servers built before the skills route move get 404 on every skills call; the base SDK worked against those servers. All 14 sync and async requests in the moved client now target api/public/skills instead of api/public/unstable/skills. That breaks when the server has not yet shipped the new route. Fix: make every skills request succeed on both server generations, e.g. fall back to the api/public/unstable/skills path on 404 or state the minimum server version in the release notes. Same pattern at 7 sync sites (raw_client.py:78, :197, :319, :431, :539, :651, :761) and their async twins (:892-:1575).

Why this was flagged

The trigger is a self-hosted or pinned Langfuse server older than the upstream commit 46d50a3, which serves skills only under /api/public/unstable/skills. Callers reach it through LangfuseAPI.skills / AsyncLangfuseAPI.skills (langfuse/api/client.py:358, :700), or through the deprecated paths if an alias is ever added. The moved RawSkillsClient hardcodes the new prefix at langfuse/api/skills/raw_client.py:78, 197, 319, 431, 539, 651, 761 and at the async copies at 892, 1011, 1133, 1245, 1353, 1465, 1575. On the base branch the same calls used "api/public/unstable/skills" and succeeded against those servers. Now list/create/get/update/get_file_contents/update_labels/delete all fail with NotFoundError. Nothing in the SDK checks the server version or retries the old path. The filed import-path findings (unstable/client.py:53) do not cover this: a deprecation alias for client.unstable.skills would still send requests to the new wire path and get 404.

Verification: In the base, langfuse/api/unstable/skills/raw_client.py sent every request to "api/public/unstable/skills", for example at line 78. In the diff, every sync and async request in langfuse/api/skills/raw_client.py now goes to "api/public/skills". Nothing falls back to the old path, and no minimum server version is stated. So client.skills.* calls return 404 on a server that only has the unstable route.

Comment on lines +44 to +45
score_metadata: typing.Callable[[], T_Result],
score_provenance: typing.Callable[[], T_Result],

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 Existing enum calls fail

Adding two required callbacks to BlobStorageExportFieldGroup.visit() breaks callers supplying the previous eleven callbacks. Even visiting an unchanged value such as CORE now raises TypeError before any callback runs. Give the new callbacks defaults so existing calls keep working for existing values.

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

Comment:
**Existing enum calls fail**

Adding two required callbacks to `BlobStorageExportFieldGroup.visit()` breaks callers supplying the previous eleven callbacks. Even visiting an unchanged value such as `CORE` now raises `TypeError` before any callback runs. Give the new callbacks defaults so existing calls keep working for existing values.

---

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

This branch has not been deployed

No deployments
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