Repository navigation
refactor(skills): set skill availability through propagation only - #2082
Conversation
Remove available_skills from observation creation, update and event APIs. Skills are set with propagate_attributes(skills_available=...), which already updates the active observation and its children, or attached from the client catalog with attach_skills=True. Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
|
@claude review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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. This removes the per-observation available_skills parameter as a straight deletion, and nothing references it anymore.
What was reviewed:
- The diff for
client.py,span.pyandattributes.py. Every removed line is either anavailable_skillsparam, docstring or kwarg, or one of the unusedSkillReference/serialize_available_skillsimports. None of the remaining logic changed. - A repo-wide search for leftover
available_skillsorcreate_available_skills_attributescallers. The only hits left are the span processor's own_available_skillsfield and its test fixtures, plusserialize_available_skillsinpropagation.py,span_processor.pyandskills.py. - The rewritten tests.
propagate_attributesis already imported intest_metadata_attribute_limit.py._propagate_attributeswritesskills_availableonto the current span, so the new assertions on the parent span still hold.
Extended reasoning...
The change removes the available_skills parameter from the Langfuse and observation-wrapper APIs and the attribute helpers, and drops or rewrites the tests that used it. It adds 19 lines and deletes 239. It touches no security-sensitive surface such as auth, crypto or data exposure. CODEOWNERS covers only .github/, and the conversation has no outstanding reviewer objections. I approved because the change is purely subtractive, the search found no leftover callers, and skills can still be set through the existing propagate_attributes(skills_available=...) path, which the updated tests cover.
What does this PR do?
Removes the
available_skillsparameter from the observation APIs (start_observation,start_as_current_observation,create_event,update,update_current_span,update_current_generationand the observation constructors). From now on, skills are set only through propagation:propagate_attributes(skills_available=[...])writes the list onto the active observation and every observation created inside the context.propagate_attributes(attach_skills=True)attaches the catalog configured withLangfuse(skills={"available": ...}).The per-observation parameter did the same job as propagation but had to be repeated on every typed overload, which made up most of #2062's API surface. It also used a different name (
available_skills) from the propagation key and the span attribute (skills_available). The feature hasn't been released yet, so removing it now doesn't break anyone.What stays:
langfuse.observation.skills_availableattribute and its reserved slot in the metadata budget, since propagation still writes it onto observations that have already started;discover_skills,SkillReferenceandSkillsConfig.The matching JS change is in langfuse/langfuse-js on the branch of the same name.
Type of change
Verification
Removed tests that only covered the per-observation parameter. Two tests that pin useful behavior now use propagation instead: propagation replaces skills on the active observation (including with
[]), and the metadata budget still leaves room for skills added after the span starts.E2E and live-provider suites were not run; nothing they cover changed.
Checklist
code_review.md..env.templateif needed.

Confidence Score: 5/5
The PR appears safe to merge.Summary
Removes
available_skillsfrom observation creation, constructors, and updates. Skills now come only frompropagate_attributes.Acknowledged by
hassiebp: removing the per-observation parameter is intentional because the feature has not been released.Reviews (1) · Last reviewed commit: "refactor(skills): set skill availability..." · Reviewed by Greptile