Skip to content

feat(api): update API spec from langfuse/langfuse 57e2f47 - #1941

Closed
langfuse-bot wants to merge 1 commit into
mainfrom
api-spec-bot-57e2f47-37626578368-1
Closed

langfuse-bot wants to merge 1 commit into
mainfrom
api-spec-bot-57e2f47-37626578368-1

Conversation

@langfuse-bot

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

Copy link
Copy Markdown
Collaborator

RetriggerConfidence Score: 4/5

Move the new client imports to the module level before merging to satisfy the repository rule.

Summary

This PR refreshes the generated API clients and types.

  • Adds experimental skill endpoints for versions, tags, labels, and file contents.
  • Adds prompt-list filters, shares cursor metadata, and narrows several JSON fields to dictionaries.
  • Removes SDK-log types and updates migration guidance.
  • The new skill examples and hash instructions need corrections. The new method-local imports also violate the repository rule.
Diagram
sequenceDiagram
  participant Caller
  participant SkillsClient
  participant RawSkillsClient
  participant API
  Caller->>SkillsClient: get(name, version or label)
  SkillsClient->>RawSkillsClient: get(...)
  RawSkillsClient->>API: GET skill manifest
  API-->>Caller: SkillVersion with file hashes
  Caller->>SkillsClient: get_file_contents(raw hashes)
  SkillsClient->>RawSkillsClient: get_file_contents(...)
  RawSkillsClient->>API: GET file contents
  API-->>Caller: SkillFileContentsResponse
Loading

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

@github-actions

github-actions Bot commented Oct 7, 2026

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.

@property
def skills(self):
if self._skills is None:
from .skills.client import SkillsClient # noqa: E402

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.

P2 Imports violate the repository rule

The new skills properties import SkillsClient and AsyncSkillsClient inside their methods. The repository requires imports at the top of the module. Move both imports there before merging to satisfy this requirement.

Rule Used: Move imports to the top of the module instead of placing them within functions or methods. (source)

Learned From
langfuse/langfuse-python#1387

Prompt To Fix With AI
This is a comment left during a code review.
Path: langfuse/api/unstable/client.py
Line: 59

Comment:
**Imports violate the repository rule**

The new `skills` properties import `SkillsClient` and `AsyncSkillsClient` inside their methods. The repository requires imports at the top of the module. Move both imports there before merging to satisfy this requirement.

**Rule Used:** Move imports to the top of the module instead of placing them within functions or methods. ([source](https://app.greptile.com/personal-org-4986/-/custom-context?memory=c960fc07-9928-409f-a18b-a780cbdded12))

**Learned From**
[langfuse/langfuse-python#1387](https://github.com/langfuse/langfuse-python/pull/1387)

---

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

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment on lines +128 to +129
from langfuse import LangfuseAPI
from langfuse.unstable.skills import SkillVersionFileInput

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.

P2 Skill examples fail at import

The new examples import clients from langfuse and models from langfuse.unstable.skills, but neither path exposes those names. Copying the examples fails before making a request. Import the clients from langfuse.api.client and SkillVersionFileInput from langfuse.api.unstable.skills. Correct the client imports throughout the new examples, including the async examples.

Prompt To Fix With AI
This is a comment left during a code review.
Path: langfuse/api/unstable/skills/client.py
Line: 128-129

Comment:
**Skill examples fail at import**

The new examples import clients from `langfuse` and models from `langfuse.unstable.skills`, but neither path exposes those names. Copying the examples fails before making a request. Import the clients from `langfuse.api.client` and `SkillVersionFileInput` from `langfuse.api.unstable.skills`. Correct the client imports throughout the new examples, including the async examples.

---

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

Parameters
----------
sha256hashes : str
Comma-separated list of one to 50 canonical base64-encoded SHA-256 hashes from skill file manifests. URL-encode the value, including +, /, and = characters.

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.

P2 Hash instructions encode values twice

get_file_contents tells callers to URL-encode sha256hashes, but HTTPX already encodes the query value. Following this instruction turns %2B into %252B, so the server receives an escaped string instead of the original base64 hash. Tell callers to pass raw comma-separated hashes. Correct the sync, async, and raw-client docstrings.

Prompt To Fix With AI
This is a comment left during a code review.
Path: langfuse/api/unstable/skills/client.py
Line: 262

Comment:
**Hash instructions encode values twice**

`get_file_contents` tells callers to URL-encode `sha256hashes`, but HTTPX already encodes the query value. Following this instruction turns `%2B` into `%252B`, so the server receives an escaped string instead of the original base64 hash. Tell callers to pass raw comma-separated hashes. Correct the sync, async, and raw-client docstrings.

---

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

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

I reviewed this PR and didn't find any bugs. Because it's a large, fully auto-generated regeneration of the API client (73 files, ~3300 lines) that adds a new unstable/skills sub-client, a generic cursor-pagination type, and narrows several metadata/schema fields from typing.Any to typing.Dict[str, typing.Any] (commons types for scores, observations, traces, datasets), a human look would still be worthwhile.

What was reviewed: the new unstable/skills client and type modules, the pagination/meta type additions (cursor_meta_response, experiments_response_meta, observations_v2meta, get_scores_v3meta), the new deprecation fields on ingestion events and commons types, and the metadata/schema type narrowing in base_score.py, observation.py, trace.py, and dataset.py (flagged by the bug hunter as a possible stricter-validation behavior change but not confirmed as an actual bug here).

Extended reasoning...

The diff is a single bot-authored, fully auto-generated regeneration of langfuse/api/ from an updated upstream OpenAPI spec (Fern codegen) — no hand-written logic outside the client package is touched, and there is no security-sensitive surface (auth/crypto/permissions) involved. The main substantive change is narrowing several metadata/schema fields from typing.Any to typing.Dict[str, typing.Any], which mirrors the upstream spec and was already surfaced by the bug hunter as a set of related candidates (ultimately not confirmed as bugs). Given the size (73 files, ~3300 lines), the brand-new skills sub-client, and that this is generated code whose correctness is best judged against the upstream spec, a human maintainer with context on the upstream change should still take a look.

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