Skip to content

feat(api): update API spec from langfuse/langfuse 8ab6c91 - #1835

Merged
hassiebp merged 1 commit into
mainfrom
api-spec-bot-8ab6c91-32859233786-1
Aug 25, 2026
Merged

feat(api): update API spec from langfuse/langfuse 8ab6c91#1835
hassiebp merged 1 commit into
mainfrom
api-spec-bot-8ab6c91-32859233786-1

Conversation

@langfuse-bot

@langfuse-bot langfuse-bot commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Greptile Summary

Updates the generated Models API to match the latest upstream specification.

  • Adds synchronous and asynchronous model upsert operations.
  • Requires model usage units and introduces typed tokenizer identifiers.
  • Adds pricing-tier input condition types and optional default fields.
  • Exposes the new generated types throughout the public API modules.

Confidence Score: 5/5

The PR appears safe to merge with no concrete changed-code failure identified.

The generated synchronous and asynchronous request paths remain aligned, public exports cover the new types, and the updated request models serialize consistently with the documented API contract.

Reviews (1): Last reviewed commit: "feat(api): update API spec from langfuse..." | Re-trigger Greptile

@langfuse-bot
langfuse-bot requested a review from hassiebp August 25, 2026 14:26
@github-actions

Copy link
Copy Markdown

@claude review

Examples
--------
from langfuse import LangfuseAPI
from langfuse.commons import ModelUsageUnit

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

馃煛 New docstring Examples added for create()/upsert() (sync and async) use from langfuse.commons import ModelUsageUnit, but no langfuse.commons module exists anywhere in the package (only langfuse.api.commons). Running the example as written raises ModuleNotFoundError. The same broken import pattern pre-exists for ScoreConfigDataType in langfuse/api/score_configs/client.py, but this diff newly introduces four fresh occurrences of the identical mistake (lines ~111, ~222, ~466, ~585) for the headline new upsert API and the now-required unit parameter, so the copy-paste example a user reaches for immediately fails.

Extended reasoning...

A developer copies the client.models.upsert(...) or client.models.create(...) example from the docstring, adds from langfuse.commons import ModelUsageUnit as shown, and gets ModuleNotFoundError: No module named 'langfuse.commons' before the client call ever executes.

Verification: Severity: nit. The docstring Examples for the new/updated create() and upsert() (sync at langfuse/api/models/client.py:111 and :222, async equivalents) contain from langfuse.commons import ModelUsageUnit, e.g. diff line adding it above client = LangfuseAPI(...) and client.models.create(... unit=ModelUsageUnit.CHARACTERS). There is no langfuse.commons module: ls langfuse/commons -> "No s

@hassiebp
hassiebp enabled auto-merge (squash) August 25, 2026 14:50
@hassiebp
hassiebp disabled auto-merge August 25, 2026 14:58
@hassiebp
hassiebp merged commit 41c5a5f into main Aug 25, 2026
20 of 22 checks passed
@hassiebp
hassiebp deleted the api-spec-bot-8ab6c91-32859233786-1 branch August 25, 2026 14:58
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.

2 participants