Skip to content

chore/regen clients#239

Merged
konstantinoscs merged 2 commits intodevelopfrom
chore/regen-clients
Apr 1, 2026
Merged

chore/regen clients#239
konstantinoscs merged 2 commits intodevelopfrom
chore/regen-clients

Conversation

@konstantinoscs
Copy link
Copy Markdown
Contributor

@konstantinoscs konstantinoscs commented Apr 1, 2026

Just regenerating clients

Summary by CodeRabbit

Release Notes

  • New Features

    • Added guest management operations: create, list, and delete guests with login URL regeneration.
    • Added organization usage monitoring to track resource consumption across teams.
    • Added retry policies for apps with configurable delays and exponential backoff.
    • Added timezone support for schedules.
  • Improvements

    • Added execution region selection for accounts and teams.
    • Enhanced team member invitations with explicit role assignment.
    • Added run attempt tracking and new "Retrying" run status.
    • Made optional fields more flexible across API models.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

⚠️ WARNING: This PR targets main instead of develop

This PR is targeting main which will trigger a production deployment when merged.

If this is a regular feature/fix PR, please change the base branch to develop.
If this is intentional (e.g., hotfix), you can ignore this warning.

Current base: main
Recommended base: develop

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 1, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d9155b40-2083-4e62-aea3-5d15d4671358

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
📝 Walkthrough

Walkthrough

Version increment to 0.3.56 with OpenAPI spec update from v0.9.29 to v0.10.14, adding guest management endpoints, retry policies, execution region support, timezone handling for schedules, and enhanced parameter management tooling. Config error handling now distinguishes IO errors from configuration directory issues.

Changes

Cohort / File(s) Summary
Version Updates
Cargo.toml, pyproject.toml
Incremented package version from 0.3.55 to 0.3.56 across workspace and Python package metadata.
Config Error Handling
crates/config/src/error.rs, crates/config/src/lib.rs, crates/config/src/towerfile.rs, crates/tower-cmd/src/output.rs
Added Error::Io variant for IO errors; updated parameter management from append-only to upsert (set_parameter); added remove_parameter method; updated error messages; re-exported Parameter type from towerfile module.
Tower-CMD Parameter Tooling
crates/tower-cmd/src/mcp.rs
Extended MCP tools with tower_file_edit_parameter and tower_file_remove_parameter; changed parameter creation from required to optional description/default fields; added hidden flag support; implemented mutual exclusivity validation between hidden and default; added modify_towerfile helper.
Tower-Runtime Status System
crates/tower-runtime/src/lib.rs, crates/tower-runtime/src/local.rs, crates/tower-runtime/src/auto_cleanup.rs, crates/tower-runtime/tests/local_test.rs
Removed Copy derive from Status enum; added Failed { error_code: String, error_message: String } variant; updated status cloning behavior in local and mock implementations; updated terminal state logic.
Tower-Telemetry Logging
crates/tower-telemetry/src/logging.rs
Added PartialEq and PartialOrd derives to LogLevel; updated filter and format layer creation to conditionally set with_target based on log level.
Tower-API OpenAPI Models (Version Strings)
crates/tower-api/README.md, crates/tower-api/src/apis/configuration.rs, crates/tower-api/src/apis/feature_flags_api.rs, crates/tower-api/src/models/*.rs (150+ files)
Updated OpenAPI version references from v0.9.29 to v0.10.14 across all model and API documentation files.
Tower-API Guest Management Endpoints
crates/tower-api/src/apis/default_api.rs
Added five new async API functions: create_guest, delete_guest, describe_organization_usage, list_guests, regenerate_guest_login_url; added corresponding request parameter structs and typed success/error enums; updated UpdateOrganizationError with explicit HTTP status variants (403, 404, 409, 422, 500).
Tower-API New Guest Models
crates/tower-api/src/models/create_guest_params.rs, crates/tower-api/src/models/create_guest_response.rs, crates/tower-api/src/models/delete_guest_output_body.rs, crates/tower-api/src/models/guest.rs, crates/tower-api/src/models/list_guests_response.rs, crates/tower-api/src/models/regenerate_guest_login_url_params.rs, crates/tower-api/src/models/regenerate_guest_login_url_response.rs
New Rust model types for guest operations with serde serialization, DefaultOnNull behavior, and constructors.
Tower-API Organization and Usage Models
crates/tower-api/src/models/organization_usage.rs, crates/tower-api/src/models/usage_limit.rs, crates/tower-api/src/models/run_attempt.rs, crates/tower-api/src/models/run_retry_policy.rs
Added OrganizationUsage and UsageLimit models for usage tracking; added RunAttempt and RunRetryPolicy for retry policy support.
Tower-API Execution Region Support
crates/tower-api/src/models/account.rs, crates/tower-api/src/models/team.rs, crates/tower-api/src/models/update_account_params.rs, crates/tower-api/src/models/update_team_params.rs
Added execution_region: String field to Account and Team; introduced ExecutionRegion enums (EuCentral1, UsEast1) with case-insensitive deserialization in param types; updated constructors to require/accept region values.
Tower-API Schedule Timezone Support
crates/tower-api/src/models/schedule.rs, crates/tower-api/src/models/create_schedule_params.rs, crates/tower-api/src/models/update_schedule_params.rs
Added timezone: String field to Schedule (required); added optional timezone support to schedule create/update params with defaults and double-option serialization.
Tower-API Run Status and Retry
crates/tower-api/src/models/run.rs, crates/tower-api/src/models/run_results.rs, crates/tower-api/src/models/run_timeseries_point.rs, crates/tower-api/src/models/run_log_line.rs, crates/tower-api/src/models/run_app_params.rs, crates/tower-api/src/models/app.rs, crates/tower-api/src/models/update_app_params.rs
Added Retrying status variant; added attempts, num_attempts, retry_policy fields to Run; added retrying counters to RunResults and RunTimeseriesPoint; added attempt_seq to RunLogLine; added retry_policy to App and RunAppParams and UpdateAppParams.
Tower-API API Key and Invitation Updates
crates/tower-api/src/models/api_key.rs, crates/tower-api/src/models/create_api_key_params.rs, crates/tower-api/src/models/invite_team_member_params.rs, crates/tower-api/src/models/team_invitation.rs, crates/tower-api/src/models/parameter.rs, crates/tower-api/src/models/run_parameter.rs
Added expires_at, scopes optional fields to APIKey; extended CreateAPIKeyParams with expires_at, scopes, team optional fields; added required role field to InviteTeamMemberParams and TeamInvitation; changed hidden field in Parameter and RunParameter from bool to Option<bool>; removed target_organization_name and will_change_organization from TeamInvitation.
Tower-API Model Exports
crates/tower-api/src/models/mod.rs
Added public module declarations and re-exports for all new guest, usage, and retry policy models.
Python Client API Endpoints
src/tower/tower_api_client/api/default/create_guest.py, src/tower/tower_api_client/api/default/delete_guest.py, src/tower/tower_api_client/api/default/describe_organization_usage.py, src/tower/tower_api_client/api/default/list_guests.py, src/tower/tower_api_client/api/default/regenerate_guest_login_url.py, src/tower/tower_api_client/api/default/update_organization.py
Added synchronous and asynchronous client functions for guest operations (create, delete, list, regenerate login URL) and organization usage; updated update_organization response parsing with explicit HTTP status handling (403, 404, 409, 422, 500).
Python Client Docstring Updates
src/tower/tower_api_client/api/default/leave_team.py, src/tower/tower_api_client/api/default/list_teams.py
Minor docstring rewording ("the user" → "you"; removed conditional phrasing).
Python Client New Models
src/tower/tower_api_client/models/create_guest_params.py, src/tower/tower_api_client/models/create_guest_response.py, src/tower/tower_api_client/models/delete_guest_output_body.py, src/tower/tower_api_client/models/guest.py, src/tower/tower_api_client/models/list_guests_response.py, src/tower/tower_api_client/models/regenerate_guest_login_url_params.py, src/tower/tower_api_client/models/regenerate_guest_login_url_response.py, src/tower/tower_api_client/models/run_attempt.py, src/tower/tower_api_client/models/run_retry_policy.py, src/tower/tower_api_client/models/organization_usage.py, src/tower/tower_api_client/models/usage_limit.py
Added Python model classes with to_dict() and from_dict() methods for guest operations, retry policies, and usage tracking.
Python Client Execution Region Enums
src/tower/tower_api_client/models/update_account_params_execution_region.py, src/tower/tower_api_client/models/update_team_params_execution_region.py, src/tower/tower_api_client/models/invite_team_member_params_role.py
Added enum types for execution regions and invitation role with string-based serialization and __str__ implementations.
Python Client Model Field Additions
src/tower/tower_api_client/models/account.py, src/tower/tower_api_client/models/api_key.py, src/tower/tower_api_client/models/app.py, src/tower/tower_api_client/models/create_api_key_params.py, src/tower/tower_api_client/models/create_schedule_params.py, src/tower/tower_api_client/models/describe_run_links.py, src/tower/tower_api_client/models/guest.py, src/tower/tower_api_client/models/invite_team_member_params.py, src/tower/tower_api_client/models/parameter.py, src/tower/tower_api_client/models/run.py, src/tower/tower_api_client/models/run_app_params.py, src/tower/tower_api_client/models/run_log_line.py, src/tower/tower_api_client/models/run_parameter.py, src/tower/tower_api_client/models/run_results.py, src/tower/tower_api_client/models/run_timeseries_point.py, src/tower/tower_api_client/models/runner.py, src/tower/tower_api_client/models/schedule.py, src/tower/tower_api_client/models/team.py, src/tower/tower_api_client/models/team_invitation.py, src/tower/tower_api_client/models/update_account_params.py, src/tower/tower_api_client/models/update_app_params.py, src/tower/tower_api_client/models/update_schedule_params.py, src/tower/tower_api_client/models/update_team_params.py
Extended models with new fields (execution_region, timezone, retry_policy, attempt_seq, role, hidden, etc.); updated to_dict() and from_dict() serialization/deserialization logic.
Python Client Model Status Enums
src/tower/tower_api_client/models/generate_run_statistics_status_item.py, src/tower/tower_api_client/models/list_runs_status_item.py, src/tower/tower_api_client/models/run_status.py, src/tower/tower_api_client/models/search_runs_status_item.py
Added RETRYING = "retrying" enum member to run status types.
Python Client Module Exports
src/tower/tower_api_client/models/__init__.py
Added imports and __all__ exports for new guest, organization usage, retry policy, and related enum types.

Possibly Related PRs

Suggested Reviewers

  • giray123
  • codingcyclist
  • sammuti

Poem

🐰 Guests now arrive with URLs to share,
Retries and regions handled with care,
Parameters hidden, no defaults in sight,
Timezones embraced, execution zones right! 🌍

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/regen-clients

@konstantinoscs konstantinoscs changed the base branch from main to develop April 1, 2026 13:45
@konstantinoscs konstantinoscs removed the request for review from codingcyclist April 1, 2026 14:20
@konstantinoscs konstantinoscs force-pushed the chore/regen-clients branch 3 times, most recently from 2c5ab76 to 9fff0f0 Compare April 1, 2026 15:27
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 13

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
crates/tower-api/src/models/run_run_initiator_details.rs (1)

20-22: ⚠️ Potential issue | 🟡 Minor

Typo in documentation comment: "initaited" → "initiated".

This appears to be carried over from the OpenAPI spec. Consider fixing at the spec level so future regenerations produce correct documentation.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/tower-api/src/models/run_run_initiator_details.rs` around lines 20 -
22, Fix the typo in the documentation comment for the run_number field in
RunRunInitiatorDetails: change "initaited" to "initiated" in the doc comment
above pub run_number: Option<i64>; additionally, if this comment originates from
the OpenAPI spec, update the spec definition so future codegen regenerations
contain the corrected wording.
🧹 Nitpick comments (5)
src/tower/tower_api_client/models/update_schedule_params.py (1)

91-91: Redundant empty update({}) call.

field_dict.update({}) is a no-op. This is likely an artifact of the code generator and has no functional impact.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/tower/tower_api_client/models/update_schedule_params.py` at line 91, The
no-op call field_dict.update({}) inside the to_dict (or serialization) logic of
UpdateScheduleParams should be removed; locate the update_schedule_params.py
implementation (the to_dict/from_dict or dict building block where field_dict is
assembled) and delete the redundant field_dict.update({}) line so the
serialization logic is cleaner and unchanged otherwise.
src/tower/tower_api_client/models/run_parameter.py (1)

19-42: Mirror optional semantics by defaulting hidden to UNSET.

At Line 24, False as default causes unconditional "hidden": false emission for new instances (Line 41-Line 42). For an Unset-aware field, UNSET is the safer default.

Suggested change
-        hidden (bool | Unset): Whether this parameter is hidden/secret. Defaults to false. Default: False.
+        hidden (bool | Unset): Whether this parameter is hidden/secret. Defaults to false when omitted. Default: UNSET.
@@
-    hidden: bool | Unset = False
+    hidden: bool | Unset = UNSET
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/tower/tower_api_client/models/run_parameter.py` around lines 19 - 42, The
RunParameter model currently defaults the field hidden to False which forces
"hidden": false into serialized output; change the declaration hidden: bool |
Unset = UNSET (instead of False) so it mirrors the Unset-aware semantics and
only emits "hidden" when explicitly set in to_dict; also update the field
docstring/default note if present to reflect UNSET as the default. Ensure
references to hidden in to_dict and any other methods (e.g., to_dict) continue
to check for UNSET.
src/tower/tower_api_client/models/parameter.py (1)

20-47: Align hidden default with other optional boolean fields in the codebase.

The hidden field at line 26 defaults to False instead of UNSET, which is inconsistent with other bool | Unset fields in the codebase (e.g., is_invitation_claimed, is_self_hosted_only, feature_updates). This causes fresh instances to always serialize "hidden": false (lines 46–47) rather than omitting the field when unset.

Suggested change
-    hidden: bool | Unset = False
+    hidden: bool | Unset = UNSET
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/tower/tower_api_client/models/parameter.py` around lines 20 - 47, The
hidden field currently defaults to False causing it always to serialize; change
the declaration of hidden in the Parameter model from "hidden: bool | Unset =
False" to use the UNSET sentinel (e.g., "hidden: bool | Unset = UNSET") so it
behaves like other optional booleans, ensure UNSET is imported/available in this
module, and keep the existing to_dict check ("if hidden is not UNSET:")
unchanged so unset values are omitted from serialization; update any tests or
usages that assumed a default False if necessary.
crates/tower-api/src/models/regenerate_guest_login_url_params.rs (1)

10-12: Unused imports in generated code.

The imports models, Deserializer, and DefaultOnNull are not used in this file. This is a minor issue typical of generated code templates. The #[serde_as] macro is applied but no fields use serde_as-specific attributes.

♻️ Suggested cleanup (optional)
-use crate::models;
-use serde::{Deserialize, Deserializer, Serialize};
-use serde_with::{serde_as, DefaultOnNull};
+use serde::{Deserialize, Serialize};

-#[serde_as]
 #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/tower-api/src/models/regenerate_guest_login_url_params.rs` around
lines 10 - 12, Remove the unused imports and unused macro attribute: delete the
unused `use crate::models;`, `use serde::Deserializer;`, and `use
serde_with::DefaultOnNull;` lines and remove the `#[serde_as]` attribute if none
of the struct fields use serde_as-specific attributes (refer to the top of the
file where `serde_as` is applied and the import lines for `models`,
`Deserializer`, and `DefaultOnNull`); keep only `use serde::{Deserialize,
Serialize};` and any imports actually referenced by the struct to eliminate the
unused-import warnings.
crates/tower-api/src/models/create_guest_params.rs (1)

20-23: DefaultOnNull on required app field may mask invalid data.

The app field is documented as required (it's the only parameter to new()), but DefaultOnNull will silently convert a null value to an empty string during deserialization. Combined with #[derive(Default)], this allows creating instances with an empty app string.

For a request params struct, this is less critical since it flows client→server, but be aware that deserialization from JSON {"app": null} will succeed with app = "" rather than failing.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/tower-api/src/models/create_guest_params.rs` around lines 20 - 23, The
app field in CreateGuestParams currently uses #[serde_as(as = "DefaultOnNull")]
which silently converts JSON null into an empty String; remove that attribute
from the pub app: String declaration so deserialization will fail on null, and
add an explicit runtime check in CreateGuestParams::new() (or wherever instances
are constructed) to reject empty strings (return Err or panic as appropriate) to
ensure callers can't create instances with an empty app; also consider
removing/adjusting any #[derive(Default)] usage that permits empty default
instances if unintended.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@crates/tower-api/src/apis/default_api.rs`:
- Around line 2320-2326: The enum UpdateOrganizationError (and the other enums
CreateSecretError, DeployAppError, DescribeRunError, DescribeRunGraphError,
UpdateMyTeamInvitationError) uses multiple status-specific variants that all
wrap models::ErrorModel and are annotated with #[serde(untagged)], causing any
matching body to always deserialize to the first variant; replace those
status-specific variants (Status403, Status404, Status409, Status422, Status500)
with a single DefaultResponse(models::ErrorModel) variant (keep
UnknownValue(serde_json::Value) if present) so the enum represents a default
error body rather than a misleading status-labeled variant; update any code that
constructs or matches these error enums to use DefaultResponse instead of
status-specific names.

In `@crates/tower-api/src/models/parameter.rs`:
- Around line 23-25: The doc comment for the field pub hidden: Option<bool> is
misleading — it currently says "Defaults to false" while the type actually omits
the field when None; update the comment to state that hidden is an Option<bool>
that is omitted when None (i.e., not serialized as an explicit false) and
document how consumers should treat a missing value, and apply the same wording
update to any other Option<bool> fields in the same struct (replace the
incorrect "Defaults to false" phrasing with "omitted when None / not serialized"
and note the effective behavior).

In `@src/tower/tower_api_client/api/default/delete_guest.py`:
- Around line 26-35: The _parse_response function is calling response.json() for
a 204 No Content response which can raise JSONDecodeError; update
_parse_response to first check response.status_code == 204 and then verify
response.content (or response.text) is non-empty before calling response.json(),
returning an appropriate empty DeleteGuestOutputBody (or using
DeleteGuestOutputBody.from_dict({}) only when content exists) for the 204 path;
for the default path ensure ErrorModel.from_dict is only called when
response.content is present. Reference: _parse_response, DeleteGuestOutputBody,
ErrorModel.

In `@src/tower/tower_api_client/api/default/update_organization.py`:
- Line 39: The typed/detailed response wrappers (e.g., the functions handling
the UpdateOrganization endpoint such as update_organization, sync_detailed,
async_detailed or any helper that returns UpdateOrganizationResponse) currently
document/annotate return types as ErrorModel | UpdateOrganizationResponse but
the diff adds a valid None parse-path; update all relevant type hints and
docstrings to include None (ErrorModel | UpdateOrganizationResponse | None) and
adjust any return annotations/TypedDicts or response wrapper classes to reflect
None as a possible parsed value so the SDK contract matches the new parsing
behavior.

In `@src/tower/tower_api_client/models/api_key.py`:
- Around line 94-100: The expires_at deserialization doesn't guard for null and
calls isoparse on None; update the block handling _expires_at to mirror
last_used_at: treat None as a valid value and only call isoparse for non-null,
non-UNSET values, and change the type annotation for expires_at to
datetime.datetime | None | Unset so None is allowed; adjust the variables
_expires_at, expires_at and the isoparse call accordingly in the ApiKey model.

In `@src/tower/tower_api_client/models/create_guest_params.py`:
- Line 68: In from_dict() of the CreateGuestParams model, preserve the declared
default for the expires_in field instead of falling back to UNSET; change the
extraction to pop "expires_in" with the model default (259200) so deserializing
a dict without expires_in retains the default value (i.e., use expires_in =
d.pop("expires_in", 259200) within CreateGuestParams.from_dict()).

In `@src/tower/tower_api_client/models/invite_team_member_params.py`:
- Around line 61-62: The from_dict deserializer for InviteTeamMemberParams uses
d.pop("role") which raises KeyError when "role" is missing; update
InviteTeamMemberParams.from_dict to supply a default by popping with a default
(use InviteTeamMemberParamsRole.DEVELOPER or its value) and then construct the
enum via InviteTeamMemberParamsRole(...), e.g., retrieve role_value =
d.pop("role", InviteTeamMemberParamsRole.DEVELOPER) and then set role =
InviteTeamMemberParamsRole(role_value) so the class-level default is respected
and missing keys don't error.

In `@src/tower/tower_api_client/models/list_runs_status_item.py`:
- Line 10: Add the new "retrying" state into the run-awaiting logic and
reconcile enum members: update _is_run_awaiting_completion in
src/tower/_client.py to treat "retrying" the same as "pending", "scheduled", and
"running" (i.e., consider it awaiting completion), and modify ListRunsStatusItem
(class/enum in list_runs_status_item.py) to include the "scheduled" member so it
matches RunStatus and the checks in _is_run_awaiting_completion; ensure any
switch/if lists that enumerate active states use a single canonical source or
include both "scheduled" and "retrying" consistently.

In `@src/tower/tower_api_client/models/regenerate_guest_login_url_params.py`:
- Around line 25-26: In regenerate_guest_login_url_params.py the attribute
expires_in has a declared default of 259200 but from_dict() currently uses UNSET
when the key is missing, causing inconsistent instances; update from_dict() (the
method that pops/reads "expires_in" from the input dict) to use 259200 as the
default when the key is absent (or when the popped value equals UNSET) and
coerce to int | Unset as the class expects, so the object created via
from_dict() matches the class-level default for expires_in.

In `@src/tower/tower_api_client/models/run_attempt.py`:
- Around line 68-79: The parser currently silently returns the original `data`
cast as a datetime when parsing fails in `_parse_ended_at` (and similarly in
`_parse_started_at`), which can mask malformed inputs; change the logic to not
fall back to `cast(...)` but instead raise a clear exception (e.g., ValueError
or TypeError) that includes the field name ("ended_at" / "started_at") and the
offending `data` value, or explicitly return None if the model should accept
missing values; update the except block to either re-raise a descriptive
exception or return None and remove the final `return cast(...)` so invalid
types are not silently accepted.

In `@src/tower/tower_api_client/models/run_results.py`:
- Around line 76-77: The parsing currently does d.pop("retrying") which will
raise KeyError for payloads missing that field; update the parsing in the
RunResults (or relevant from_dict/parse method where retrying is extracted) to
use a safe default like d.pop("retrying", False) or d.get("retrying", False) and
then cast/validate as needed so older payloads without "retrying" parse
successfully; ensure any downstream use of the retrying variable still expects
the same boolean type.

In `@src/tower/tower_api_client/models/run.py`:
- Around line 296-301: The code treating _retry_policy uses isinstance(...,
Unset) but doesn't handle JSON null (None), so RunRetryPolicy.from_dict(None)
will raise; update the branch in the deserialization for retry_policy (variable
names: _retry_policy, retry_policy) to treat None the same as UNSET (or
explicitly check for None) before calling RunRetryPolicy.from_dict, e.g., if
_retry_policy is UNSET or _retry_policy is None then set retry_policy = UNSET,
otherwise call RunRetryPolicy.from_dict(_retry_policy).
- Around line 285-293: The deserialization in models/run.py assumes _attempts is
iterable but if the API returns "attempts": null then _attempts will be None and
the for-loop in the Run model will raise a TypeError; update the check around
_attempts (in the Run.from_dict or equivalent deserialization block that sets
attempts) to explicitly guard against None (e.g., require _attempts is not UNSET
and _attempts is not None or check isinstance(_attempts, list)) before
iterating, and apply the same defensive change to the analogous pattern in other
models such as error_model.py to avoid NoneType iteration errors.

---

Outside diff comments:
In `@crates/tower-api/src/models/run_run_initiator_details.rs`:
- Around line 20-22: Fix the typo in the documentation comment for the
run_number field in RunRunInitiatorDetails: change "initaited" to "initiated" in
the doc comment above pub run_number: Option<i64>; additionally, if this comment
originates from the OpenAPI spec, update the spec definition so future codegen
regenerations contain the corrected wording.

---

Nitpick comments:
In `@crates/tower-api/src/models/create_guest_params.rs`:
- Around line 20-23: The app field in CreateGuestParams currently uses
#[serde_as(as = "DefaultOnNull")] which silently converts JSON null into an
empty String; remove that attribute from the pub app: String declaration so
deserialization will fail on null, and add an explicit runtime check in
CreateGuestParams::new() (or wherever instances are constructed) to reject empty
strings (return Err or panic as appropriate) to ensure callers can't create
instances with an empty app; also consider removing/adjusting any
#[derive(Default)] usage that permits empty default instances if unintended.

In `@crates/tower-api/src/models/regenerate_guest_login_url_params.rs`:
- Around line 10-12: Remove the unused imports and unused macro attribute:
delete the unused `use crate::models;`, `use serde::Deserializer;`, and `use
serde_with::DefaultOnNull;` lines and remove the `#[serde_as]` attribute if none
of the struct fields use serde_as-specific attributes (refer to the top of the
file where `serde_as` is applied and the import lines for `models`,
`Deserializer`, and `DefaultOnNull`); keep only `use serde::{Deserialize,
Serialize};` and any imports actually referenced by the struct to eliminate the
unused-import warnings.

In `@src/tower/tower_api_client/models/parameter.py`:
- Around line 20-47: The hidden field currently defaults to False causing it
always to serialize; change the declaration of hidden in the Parameter model
from "hidden: bool | Unset = False" to use the UNSET sentinel (e.g., "hidden:
bool | Unset = UNSET") so it behaves like other optional booleans, ensure UNSET
is imported/available in this module, and keep the existing to_dict check ("if
hidden is not UNSET:") unchanged so unset values are omitted from serialization;
update any tests or usages that assumed a default False if necessary.

In `@src/tower/tower_api_client/models/run_parameter.py`:
- Around line 19-42: The RunParameter model currently defaults the field hidden
to False which forces "hidden": false into serialized output; change the
declaration hidden: bool | Unset = UNSET (instead of False) so it mirrors the
Unset-aware semantics and only emits "hidden" when explicitly set in to_dict;
also update the field docstring/default note if present to reflect UNSET as the
default. Ensure references to hidden in to_dict and any other methods (e.g.,
to_dict) continue to check for UNSET.

In `@src/tower/tower_api_client/models/update_schedule_params.py`:
- Line 91: The no-op call field_dict.update({}) inside the to_dict (or
serialization) logic of UpdateScheduleParams should be removed; locate the
update_schedule_params.py implementation (the to_dict/from_dict or dict building
block where field_dict is assembled) and delete the redundant
field_dict.update({}) line so the serialization logic is cleaner and unchanged
otherwise.
🪄 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: CHILL

Plan: Pro

Run ID: f4f960d4-e813-46a0-b77f-20de3e1b2ab3

📥 Commits

Reviewing files that changed from the base of the PR and between 7c33c8c and 75050f4.

📒 Files selected for processing (271)
  • crates/tower-api/README.md
  • crates/tower-api/src/apis/configuration.rs
  • crates/tower-api/src/apis/default_api.rs
  • crates/tower-api/src/apis/feature_flags_api.rs
  • crates/tower-api/src/models/account.rs
  • crates/tower-api/src/models/acknowledge_alert_response.rs
  • crates/tower-api/src/models/acknowledge_all_alerts_response.rs
  • crates/tower-api/src/models/alert.rs
  • crates/tower-api/src/models/api_key.rs
  • crates/tower-api/src/models/app.rs
  • crates/tower-api/src/models/app_statistics.rs
  • crates/tower-api/src/models/app_summary.rs
  • crates/tower-api/src/models/app_version.rs
  • crates/tower-api/src/models/authentication_context.rs
  • crates/tower-api/src/models/batch_schedule_params.rs
  • crates/tower-api/src/models/batch_schedule_response.rs
  • crates/tower-api/src/models/cancel_run_response.rs
  • crates/tower-api/src/models/catalog.rs
  • crates/tower-api/src/models/catalog_property.rs
  • crates/tower-api/src/models/claim_device_login_ticket_params.rs
  • crates/tower-api/src/models/claim_device_login_ticket_response.rs
  • crates/tower-api/src/models/create_account_params.rs
  • crates/tower-api/src/models/create_account_params_flags_struct.rs
  • crates/tower-api/src/models/create_account_response.rs
  • crates/tower-api/src/models/create_api_key_params.rs
  • crates/tower-api/src/models/create_api_key_response.rs
  • crates/tower-api/src/models/create_app_params.rs
  • crates/tower-api/src/models/create_app_response.rs
  • crates/tower-api/src/models/create_authenticator_params.rs
  • crates/tower-api/src/models/create_authenticator_response.rs
  • crates/tower-api/src/models/create_catalog_params.rs
  • crates/tower-api/src/models/create_catalog_response.rs
  • crates/tower-api/src/models/create_device_login_ticket_response.rs
  • crates/tower-api/src/models/create_environment_params.rs
  • crates/tower-api/src/models/create_environment_response.rs
  • crates/tower-api/src/models/create_guest_params.rs
  • crates/tower-api/src/models/create_guest_response.rs
  • crates/tower-api/src/models/create_password_reset_params.rs
  • crates/tower-api/src/models/create_password_reset_response.rs
  • crates/tower-api/src/models/create_sandbox_secrets_params.rs
  • crates/tower-api/src/models/create_sandbox_secrets_response.rs
  • crates/tower-api/src/models/create_schedule_params.rs
  • crates/tower-api/src/models/create_schedule_response.rs
  • crates/tower-api/src/models/create_secret_params.rs
  • crates/tower-api/src/models/create_secret_response.rs
  • crates/tower-api/src/models/create_session_params.rs
  • crates/tower-api/src/models/create_session_response.rs
  • crates/tower-api/src/models/create_team_params.rs
  • crates/tower-api/src/models/create_team_response.rs
  • crates/tower-api/src/models/create_webhook_params.rs
  • crates/tower-api/src/models/create_webhook_response.rs
  • crates/tower-api/src/models/delete_api_key_params.rs
  • crates/tower-api/src/models/delete_api_key_response.rs
  • crates/tower-api/src/models/delete_app_response.rs
  • crates/tower-api/src/models/delete_authenticator_params.rs
  • crates/tower-api/src/models/delete_authenticator_response.rs
  • crates/tower-api/src/models/delete_catalog_response.rs
  • crates/tower-api/src/models/delete_guest_output_body.rs
  • crates/tower-api/src/models/delete_schedule_params.rs
  • crates/tower-api/src/models/delete_schedule_response.rs
  • crates/tower-api/src/models/delete_secret_response.rs
  • crates/tower-api/src/models/delete_session_params.rs
  • crates/tower-api/src/models/delete_session_response.rs
  • crates/tower-api/src/models/delete_team_invitation_params.rs
  • crates/tower-api/src/models/delete_team_invitation_response.rs
  • crates/tower-api/src/models/delete_team_params.rs
  • crates/tower-api/src/models/delete_team_response.rs
  • crates/tower-api/src/models/delete_webhook_response.rs
  • crates/tower-api/src/models/deploy_app_request.rs
  • crates/tower-api/src/models/deploy_app_response.rs
  • crates/tower-api/src/models/describe_account_body.rs
  • crates/tower-api/src/models/describe_app_response.rs
  • crates/tower-api/src/models/describe_app_version_response.rs
  • crates/tower-api/src/models/describe_authentication_context_body.rs
  • crates/tower-api/src/models/describe_device_login_session_response.rs
  • crates/tower-api/src/models/describe_email_preferences_body.rs
  • crates/tower-api/src/models/describe_plan_response.rs
  • crates/tower-api/src/models/describe_run_graph_response.rs
  • crates/tower-api/src/models/describe_run_links.rs
  • crates/tower-api/src/models/describe_run_logs_response.rs
  • crates/tower-api/src/models/describe_run_response.rs
  • crates/tower-api/src/models/describe_secrets_key_response.rs
  • crates/tower-api/src/models/describe_session_response.rs
  • crates/tower-api/src/models/describe_team_response.rs
  • crates/tower-api/src/models/describe_webhook_response.rs
  • crates/tower-api/src/models/email_subscriptions.rs
  • crates/tower-api/src/models/encrypted_catalog_property.rs
  • crates/tower-api/src/models/environment.rs
  • crates/tower-api/src/models/error_detail.rs
  • crates/tower-api/src/models/error_model.rs
  • crates/tower-api/src/models/event_alert.rs
  • crates/tower-api/src/models/event_error.rs
  • crates/tower-api/src/models/event_log.rs
  • crates/tower-api/src/models/event_shouldertap.rs
  • crates/tower-api/src/models/event_warning.rs
  • crates/tower-api/src/models/export_catalogs_params.rs
  • crates/tower-api/src/models/export_catalogs_response.rs
  • crates/tower-api/src/models/export_secrets_params.rs
  • crates/tower-api/src/models/export_secrets_response.rs
  • crates/tower-api/src/models/exported_catalog.rs
  • crates/tower-api/src/models/exported_catalog_property.rs
  • crates/tower-api/src/models/exported_secret.rs
  • crates/tower-api/src/models/feature.rs
  • crates/tower-api/src/models/featurebase_identity.rs
  • crates/tower-api/src/models/generate_app_statistics_response.rs
  • crates/tower-api/src/models/generate_authenticator_response.rs
  • crates/tower-api/src/models/generate_run_statistics_response.rs
  • crates/tower-api/src/models/generate_runner_credentials_response.rs
  • crates/tower-api/src/models/get_feature_flag_response_body.rs
  • crates/tower-api/src/models/guest.rs
  • crates/tower-api/src/models/invite_team_member_params.rs
  • crates/tower-api/src/models/invite_team_member_response.rs
  • crates/tower-api/src/models/leave_team_response.rs
  • crates/tower-api/src/models/list_alerts_response.rs
  • crates/tower-api/src/models/list_api_keys_response.rs
  • crates/tower-api/src/models/list_app_environments_response.rs
  • crates/tower-api/src/models/list_app_versions_response.rs
  • crates/tower-api/src/models/list_apps_response.rs
  • crates/tower-api/src/models/list_authenticators_response.rs
  • crates/tower-api/src/models/list_catalogs_response.rs
  • crates/tower-api/src/models/list_environments_response.rs
  • crates/tower-api/src/models/list_guests_response.rs
  • crates/tower-api/src/models/list_my_team_invitations_response.rs
  • crates/tower-api/src/models/list_runners_response.rs
  • crates/tower-api/src/models/list_runs_response.rs
  • crates/tower-api/src/models/list_schedules_response.rs
  • crates/tower-api/src/models/list_secret_environments_response.rs
  • crates/tower-api/src/models/list_secrets_response.rs
  • crates/tower-api/src/models/list_team_invitations_response.rs
  • crates/tower-api/src/models/list_team_members_response.rs
  • crates/tower-api/src/models/list_teams_response.rs
  • crates/tower-api/src/models/list_webhooks_response.rs
  • crates/tower-api/src/models/mod.rs
  • crates/tower-api/src/models/organization.rs
  • crates/tower-api/src/models/organization_usage.rs
  • crates/tower-api/src/models/pagination.rs
  • crates/tower-api/src/models/parameter.rs
  • crates/tower-api/src/models/plan.rs
  • crates/tower-api/src/models/refresh_session_params.rs
  • crates/tower-api/src/models/refresh_session_response.rs
  • crates/tower-api/src/models/regenerate_guest_login_url_params.rs
  • crates/tower-api/src/models/regenerate_guest_login_url_response.rs
  • crates/tower-api/src/models/remove_team_member_params.rs
  • crates/tower-api/src/models/remove_team_member_response.rs
  • crates/tower-api/src/models/resend_team_invitation_params.rs
  • crates/tower-api/src/models/resend_team_invitation_response.rs
  • crates/tower-api/src/models/run.rs
  • crates/tower-api/src/models/run_app_initiator_data.rs
  • crates/tower-api/src/models/run_app_params.rs
  • crates/tower-api/src/models/run_app_response.rs
  • crates/tower-api/src/models/run_attempt.rs
  • crates/tower-api/src/models/run_failure_alert.rs
  • crates/tower-api/src/models/run_graph_node.rs
  • crates/tower-api/src/models/run_graph_run_id.rs
  • crates/tower-api/src/models/run_initiator.rs
  • crates/tower-api/src/models/run_initiator_details.rs
  • crates/tower-api/src/models/run_log_line.rs
  • crates/tower-api/src/models/run_parameter.rs
  • crates/tower-api/src/models/run_results.rs
  • crates/tower-api/src/models/run_retry_policy.rs
  • crates/tower-api/src/models/run_run_initiator_details.rs
  • crates/tower-api/src/models/run_statistics.rs
  • crates/tower-api/src/models/run_timeseries_point.rs
  • crates/tower-api/src/models/runner.rs
  • crates/tower-api/src/models/runner_credentials.rs
  • crates/tower-api/src/models/schedule.rs
  • crates/tower-api/src/models/schedule_run_initiator_details.rs
  • crates/tower-api/src/models/search_runs_response.rs
  • crates/tower-api/src/models/secret.rs
  • crates/tower-api/src/models/server_sent_events_inner.rs
  • crates/tower-api/src/models/server_sent_events_inner_1.rs
  • crates/tower-api/src/models/server_sent_events_inner_2.rs
  • crates/tower-api/src/models/session.rs
  • crates/tower-api/src/models/shoulder_tap.rs
  • crates/tower-api/src/models/sse_warning.rs
  • crates/tower-api/src/models/statistics_settings.rs
  • crates/tower-api/src/models/team.rs
  • crates/tower-api/src/models/team_invitation.rs
  • crates/tower-api/src/models/team_membership.rs
  • crates/tower-api/src/models/test_webhook_response.rs
  • crates/tower-api/src/models/token.rs
  • crates/tower-api/src/models/unverified_authenticator.rs
  • crates/tower-api/src/models/update_account_params.rs
  • crates/tower-api/src/models/update_account_response.rs
  • crates/tower-api/src/models/update_app_params.rs
  • crates/tower-api/src/models/update_app_response.rs
  • crates/tower-api/src/models/update_catalog_params.rs
  • crates/tower-api/src/models/update_catalog_response.rs
  • crates/tower-api/src/models/update_email_preferences_body.rs
  • crates/tower-api/src/models/update_environment_params.rs
  • crates/tower-api/src/models/update_environment_response.rs
  • crates/tower-api/src/models/update_my_team_invitation_params.rs
  • crates/tower-api/src/models/update_my_team_invitation_response.rs
  • crates/tower-api/src/models/update_organization_params.rs
  • crates/tower-api/src/models/update_organization_response.rs
  • crates/tower-api/src/models/update_password_reset_params.rs
  • crates/tower-api/src/models/update_password_reset_response.rs
  • crates/tower-api/src/models/update_plan_params.rs
  • crates/tower-api/src/models/update_plan_response.rs
  • crates/tower-api/src/models/update_schedule_params.rs
  • crates/tower-api/src/models/update_schedule_response.rs
  • crates/tower-api/src/models/update_secret_params.rs
  • crates/tower-api/src/models/update_secret_response.rs
  • crates/tower-api/src/models/update_team_member_params.rs
  • crates/tower-api/src/models/update_team_member_response.rs
  • crates/tower-api/src/models/update_team_params.rs
  • crates/tower-api/src/models/update_team_response.rs
  • crates/tower-api/src/models/update_user_params.rs
  • crates/tower-api/src/models/update_user_response.rs
  • crates/tower-api/src/models/update_webhook_params.rs
  • crates/tower-api/src/models/update_webhook_response.rs
  • crates/tower-api/src/models/usage_limit.rs
  • crates/tower-api/src/models/user.rs
  • crates/tower-api/src/models/verified_authenticator.rs
  • crates/tower-api/src/models/verify_email_params.rs
  • crates/tower-api/src/models/verify_email_response.rs
  • crates/tower-api/src/models/webhook.rs
  • crates/tower-cmd/src/api.rs
  • crates/tower-cmd/src/apps.rs
  • crates/tower-cmd/src/mcp.rs
  • src/tower/tower_api_client/api/default/create_guest.py
  • src/tower/tower_api_client/api/default/delete_guest.py
  • src/tower/tower_api_client/api/default/describe_organization_usage.py
  • src/tower/tower_api_client/api/default/leave_team.py
  • src/tower/tower_api_client/api/default/list_guests.py
  • src/tower/tower_api_client/api/default/list_teams.py
  • src/tower/tower_api_client/api/default/regenerate_guest_login_url.py
  • src/tower/tower_api_client/api/default/update_organization.py
  • src/tower/tower_api_client/models/__init__.py
  • src/tower/tower_api_client/models/account.py
  • src/tower/tower_api_client/models/api_key.py
  • src/tower/tower_api_client/models/app.py
  • src/tower/tower_api_client/models/create_api_key_params.py
  • src/tower/tower_api_client/models/create_guest_params.py
  • src/tower/tower_api_client/models/create_guest_response.py
  • src/tower/tower_api_client/models/create_schedule_params.py
  • src/tower/tower_api_client/models/delete_guest_output_body.py
  • src/tower/tower_api_client/models/describe_run_links.py
  • src/tower/tower_api_client/models/generate_run_statistics_status_item.py
  • src/tower/tower_api_client/models/guest.py
  • src/tower/tower_api_client/models/invite_team_member_params.py
  • src/tower/tower_api_client/models/invite_team_member_params_role.py
  • src/tower/tower_api_client/models/list_guests_response.py
  • src/tower/tower_api_client/models/list_runs_status_item.py
  • src/tower/tower_api_client/models/organization_usage.py
  • src/tower/tower_api_client/models/parameter.py
  • src/tower/tower_api_client/models/regenerate_guest_login_url_params.py
  • src/tower/tower_api_client/models/regenerate_guest_login_url_response.py
  • src/tower/tower_api_client/models/run.py
  • src/tower/tower_api_client/models/run_app_params.py
  • src/tower/tower_api_client/models/run_attempt.py
  • src/tower/tower_api_client/models/run_log_line.py
  • src/tower/tower_api_client/models/run_parameter.py
  • src/tower/tower_api_client/models/run_results.py
  • src/tower/tower_api_client/models/run_retry_policy.py
  • src/tower/tower_api_client/models/run_status.py
  • src/tower/tower_api_client/models/run_timeseries_point.py
  • src/tower/tower_api_client/models/runner.py
  • src/tower/tower_api_client/models/schedule.py
  • src/tower/tower_api_client/models/search_runs_status_item.py
  • src/tower/tower_api_client/models/team.py
  • src/tower/tower_api_client/models/team_invitation.py
  • src/tower/tower_api_client/models/update_account_params.py
  • src/tower/tower_api_client/models/update_account_params_execution_region.py
  • src/tower/tower_api_client/models/update_app_params.py
  • src/tower/tower_api_client/models/update_schedule_params.py
  • src/tower/tower_api_client/models/update_team_params.py
  • src/tower/tower_api_client/models/update_team_params_execution_region.py
  • src/tower/tower_api_client/models/usage_limit.py
  • tests/mock-api-server/main.py
  • tests/tower/test_client.py

Comment thread crates/tower-api/src/apis/default_api.rs
Comment thread crates/tower-api/src/models/parameter.rs
Comment thread src/tower/tower_api_client/api/default/delete_guest.py
Comment thread src/tower/tower_api_client/api/default/update_organization.py
Comment thread src/tower/tower_api_client/models/api_key.py
Comment thread src/tower/tower_api_client/models/run_attempt.py
Comment thread src/tower/tower_api_client/models/run_results.py
Comment thread src/tower/tower_api_client/models/run.py
Comment thread src/tower/tower_api_client/models/run.py
@konstantinoscs konstantinoscs merged commit 396e618 into develop Apr 1, 2026
34 of 35 checks passed
@konstantinoscs konstantinoscs deleted the chore/regen-clients branch April 1, 2026 16:39
@coderabbitai coderabbitai Bot mentioned this pull request Apr 2, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Apr 10, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Apr 22, 2026
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