Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
Oops, something went wrong! Please try again later. 🐰 💔 |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Actionable comments posted: 3
♻️ Duplicate comments (3)
src/truefoundry_sdk/agent_skill_versions/raw_client.py (2)
190-201:⚠️ Potential issue | 🔴 CriticalFix non-terminating pagination on empty pages.
Line 190 and Line 389 hardcode
_has_next = True. If an empty page is returned, Line 197/398 does not advance offset, so callers can loop forever onget_next().Based on learnings: For autogenerated SDK regeneration PRs, only interface-breaking issues should be called out.Proposed fix
- _has_next = True + _has_next = len(_items or []) > 0 ... - _has_next = True + _has_next = len(_items or []) > 0Also applies to: 389-403
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/truefoundry_sdk/agent_skill_versions/raw_client.py` around lines 190 - 201, The pager currently sets _has_next = True unconditionally which causes infinite loops when an empty page is returned; change the logic in the list/SyncPager return to compute _has_next based on the actual items/limit (e.g., _has_next = len(_items or []) == limit) so that when an empty page is returned has_next becomes False, and apply the same fix to the other identical block (the second occurrence around the 389-403 region); keep the get_next closure using offset + len(_items or []) so offset still advances correctly when items are present.
125-125:⚠️ Potential issue | 🟠 MajorExpand
versiontyping to match the documented public contract.Line 125 and Line 324 only allow
typing.Optional[int], but Line 148 and Line 347 document support for'latest'. This is an interface break for typed callers.Based on learnings: For autogenerated SDK regeneration PRs, only interface-breaking issues should be called out.Proposed fix
- version: typing.Optional[int] = None, + version: typing.Optional[typing.Union[int, str]] = None, ... - version: typing.Optional[int] = None, + version: typing.Optional[typing.Union[int, str]] = None,Also applies to: 147-149, 324-324, 346-348
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/truefoundry_sdk/agent_skill_versions/raw_client.py` at line 125, The typed signature for the parameter named "version" is currently typing.Optional[int] but the public contract also accepts the string 'latest'; update all function/method signatures that declare version: typing.Optional[int] = None to instead use typing.Optional[typing.Union[int, typing.Literal['latest']]] (or Optional[Union[int, Literal['latest']]] after importing Union and Literal) so typed callers accept both integers and the 'latest' sentinel; update any corresponding type hints in docstrings/comments if present and ensure imports include Union and Literal where these signatures appear.src/truefoundry_sdk/agent_skills/raw_client.py (1)
195-205:⚠️ Potential issue | 🔴 CriticalStop advertising next page unconditionally in both pagers.
Line 195 and Line 451 set
_has_next = Trueregardless of response contents. On empty pages, offset does not move (Line 200/458), causing repeated fetches of the same page.Based on learnings: For autogenerated SDK regeneration PRs, only interface-breaking issues should be called out.Proposed fix
- _has_next = True + _has_next = len(_items or []) > 0 ... - _has_next = True + _has_next = len(_items or []) > 0Also applies to: 451-464
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/truefoundry_sdk/agent_skills/raw_client.py` around lines 195 - 205, The pager currently sets _has_next = True unconditionally in the list() pager creation (see SyncPager usage in raw_client.py) which causes infinite repeated fetches when a page is empty; change the logic to compute _has_next based on the response contents (e.g., set _has_next = bool(_items) and/or _has_next = len(_items) == limit, and/or consult any total/next-marker in _parsed_response if available) and ensure the _get_next offset progression uses len(_items or []) so the offset advances only when items were returned; apply the same fix to the equivalent async pager code path (the other pager block around lines ~451-464) so neither pager advertises a next page when there aren’t additional items.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/truefoundry_sdk/types/google_model_armor_guardrail_config.py`:
- Around line 43-45: The public type of the field operation in
GoogleModelArmorGuardrailConfig was changed from a single Literal to
GoogleModelArmorGuardrailConfigOperation which is a breaking change for typed
callers; restore compatibility by either reverting operation to the original
Literal["validate"] contract or make it an explicit union that preserves the old
literal (e.g., Union[Literal["validate"],
GoogleModelArmorGuardrailConfigOperation]) and add a clear deprecation comment /
docstring noting the upcoming change; update the declaration of operation and
its docstring in GoogleModelArmorGuardrailConfig so callers and type checkers
retain the previous narrowing behavior while you communicate the breaking
change.
In `@src/truefoundry_sdk/types/open_ai_moderations_guardrail_config_config.py`:
- Line 25: The field category_thresholds on
OpenAiModerationsGuardrailConfigConfig was changed from Dict[str,
OpenAiModerationsGuardrailConfigConfigCategoryThresholdsValue] to Dict[str,
float], which is a breaking type change; restore compatibility by allowing both
shapes: update the type hint for category_thresholds to accept Union[Dict[str,
float], Dict[str,
OpenAiModerationsGuardrailConfigConfigCategoryThresholdsValue]] (or more
generally Dict[str, Any]) and add normalization logic in the class initializer
or a dedicated validator (e.g., in __post_init__ / from_dict / validate method)
to convert any OpenAiModerationsGuardrailConfigConfigCategoryThresholdsValue
instances to floats (extracting the proper numeric field) while preserving
existing float values, and keep a short deprecation note in the docstring for
the old inner type so callers are guided to migrate.
In `@src/truefoundry_sdk/types/spark_job.py`:
- Line 43: The type for SparkJob.spark_conf was narrowed to Optional[Dict[str,
Optional[str]]], which breaks callers that pass non-string values; revert to a
backward-compatible permissive value type by changing the annotation to
typing.Optional[typing.Dict[str, typing.Any]] on the spark_conf field in the
SparkJob model, or if the narrowing is intentional explicitly document it as a
breaking change and add coercion/migration logic in SparkJob.__init__ to convert
non-string values to strings before assignment.
---
Duplicate comments:
In `@src/truefoundry_sdk/agent_skill_versions/raw_client.py`:
- Around line 190-201: The pager currently sets _has_next = True unconditionally
which causes infinite loops when an empty page is returned; change the logic in
the list/SyncPager return to compute _has_next based on the actual items/limit
(e.g., _has_next = len(_items or []) == limit) so that when an empty page is
returned has_next becomes False, and apply the same fix to the other identical
block (the second occurrence around the 389-403 region); keep the get_next
closure using offset + len(_items or []) so offset still advances correctly when
items are present.
- Line 125: The typed signature for the parameter named "version" is currently
typing.Optional[int] but the public contract also accepts the string 'latest';
update all function/method signatures that declare version: typing.Optional[int]
= None to instead use typing.Optional[typing.Union[int,
typing.Literal['latest']]] (or Optional[Union[int, Literal['latest']]] after
importing Union and Literal) so typed callers accept both integers and the
'latest' sentinel; update any corresponding type hints in docstrings/comments if
present and ensure imports include Union and Literal where these signatures
appear.
In `@src/truefoundry_sdk/agent_skills/raw_client.py`:
- Around line 195-205: The pager currently sets _has_next = True unconditionally
in the list() pager creation (see SyncPager usage in raw_client.py) which causes
infinite repeated fetches when a page is empty; change the logic to compute
_has_next based on the response contents (e.g., set _has_next = bool(_items)
and/or _has_next = len(_items) == limit, and/or consult any total/next-marker in
_parsed_response if available) and ensure the _get_next offset progression uses
len(_items or []) so the offset advances only when items were returned; apply
the same fix to the equivalent async pager code path (the other pager block
around lines ~451-464) so neither pager advertises a next page when there aren’t
additional items.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 426d91db-ae51-4bbd-89ac-b00533076df4
📒 Files selected for processing (43)
.fern/metadata.jsonreference.mdsrc/truefoundry_sdk/agent_skill_versions/raw_client.pysrc/truefoundry_sdk/agent_skills/raw_client.pysrc/truefoundry_sdk/artifact_versions/client.pysrc/truefoundry_sdk/artifact_versions/raw_client.pysrc/truefoundry_sdk/artifacts/raw_client.pysrc/truefoundry_sdk/base_client.pysrc/truefoundry_sdk/data_directories/raw_client.pysrc/truefoundry_sdk/internal/artifact_versions/raw_client.pysrc/truefoundry_sdk/internal/docker_registries/raw_client.pysrc/truefoundry_sdk/internal/ml/raw_client.pysrc/truefoundry_sdk/ml_repos/client.pysrc/truefoundry_sdk/ml_repos/raw_client.pysrc/truefoundry_sdk/model_versions/client.pysrc/truefoundry_sdk/model_versions/raw_client.pysrc/truefoundry_sdk/models/raw_client.pysrc/truefoundry_sdk/personal_access_tokens/raw_client.pysrc/truefoundry_sdk/prompt_versions/client.pysrc/truefoundry_sdk/prompt_versions/raw_client.pysrc/truefoundry_sdk/prompts/raw_client.pysrc/truefoundry_sdk/secret_groups/client.pysrc/truefoundry_sdk/secret_groups/raw_client.pysrc/truefoundry_sdk/teams/client.pysrc/truefoundry_sdk/teams/raw_client.pysrc/truefoundry_sdk/types/a2a_framework.pysrc/truefoundry_sdk/types/akto_guardrail_config.pysrc/truefoundry_sdk/types/artifact_manifest.pysrc/truefoundry_sdk/types/databricks_job_task_config.pysrc/truefoundry_sdk/types/google_model_armor_guardrail_config.pysrc/truefoundry_sdk/types/internal_model_version.pysrc/truefoundry_sdk/types/latency_based_load_balance_target.pysrc/truefoundry_sdk/types/load_balance_target.pysrc/truefoundry_sdk/types/mcp_tool_target.pysrc/truefoundry_sdk/types/metric.pysrc/truefoundry_sdk/types/model_manifest.pysrc/truefoundry_sdk/types/model_version.pysrc/truefoundry_sdk/types/open_ai_moderations_guardrail_config_config.pysrc/truefoundry_sdk/types/priority_based_load_balance_target.pysrc/truefoundry_sdk/types/prometheus_alert_rule.pysrc/truefoundry_sdk/types/secret_detection_guardrail_config.pysrc/truefoundry_sdk/types/spark_job.pysrc/truefoundry_sdk/types/stdio_mcp_server_manifest.py
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/truefoundry_sdk/types/__init__.py`:
- Around line 678-687: Add back-compat aliases for the removed OTEL public names
by mapping the old exported symbols to the new ones (e.g., define
OtelExporterGrpcConfig = OtelExporterGrpcConfigBase, OtelExporterHttpConfig =
OtelExporterHttpConfigBase, OtelTracesExporterSpanFilter (or other legacy
span/filter names) = OtelTracesExporterSpanAttributeFilter, etc.), update
__all__ to include the legacy names, and emit a DeprecationWarning via
warnings.warn when those legacy aliases are referenced so consumers get a
one-release deprecation path; touch the module-level identifiers shown
(OtelExporterGrpcConfigBase, OtelExporterHttpConfigBase,
OtelExporterHttpConfigBaseEncoding, OtelMetricsExporterGrpcConfig,
OtelMetricsExporterHttpConfig, OtelTracesExporterCommonConfig,
OtelTracesExporterGrpcConfig, OtelTracesExporterHttpConfig,
OtelTracesExporterSpanAttributeFilter) to create the corresponding legacy alias
names and expose them from truefoundry_sdk.types.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: d39d2f92-bd73-4422-891e-82f14d723b26
📒 Files selected for processing (10)
.fern/metadata.jsonsrc/truefoundry_sdk/__init__.pysrc/truefoundry_sdk/types/__init__.pysrc/truefoundry_sdk/types/custom_endpoint.pysrc/truefoundry_sdk/types/custom_endpoint_auth_data.pysrc/truefoundry_sdk/types/custom_endpoint_integrations.pysrc/truefoundry_sdk/types/custom_endpoint_provider_account.pysrc/truefoundry_sdk/types/custom_endpoint_provider_account_auth_data.pysrc/truefoundry_sdk/types/flyte_task_custom_truefoundry.pysrc/truefoundry_sdk/types/model_provider_account.py
|
@coderabbitai Review this PR
|
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain
Summary of interface-breaking changes (verified against origin/main via scripts): Public client.v1 methods
Type-level breaking changes
Removed public exports (imports will now fail)
Enum changes
Core module exports
Recommended caller migrations (concise)
If you’d like, I can generate a BREAKING_CHANGES.md snippet from this for the release notes. [resolve] 🏁 Script executed: Length of output: 2997
Public client.v1 surface
Breaking changes in types
Enum member changes
Core/public module exports
Migration hints (brief)
If you want, I can generate a compact BREAKING_CHANGES.md from this list. 🧠 Learnings used |
Note
Medium Risk
Large auto-generated SDK surface change (new/modified endpoints and parameters) may introduce subtle breaking changes for existing client consumers despite being largely mechanical regeneration.
Overview
Regenerates the Python SDK with an updated Fern CLI/generator, updating
.fern/metadata.jsonand bumping locked deps (e.g.charset-normalizer,packaging,tomli).Expands/reshapes the generated client API and docs (
reference.md), including new resource clients for ML/registry entities (e.g. agent skills, prompts/models/artifacts and their version operations), new permissions endpoints for users/teams, additional job run operations, and added query/option parameters across existing methods (e.g. tenant scoping, search filters, dry-run flags, and richer list filters).Reviewed by Cursor Bugbot for commit d61bf2a. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
Release Notes
New Features
dry_runparameter to create/update operationsname_search_queryfilter for personal access token listingImprovements