Skip to content

release: 1.77.0#664

Open
stainless-app[bot] wants to merge 31 commits into
mainfrom
release-please--branches--main--changes--next
Open

release: 1.77.0#664
stainless-app[bot] wants to merge 31 commits into
mainfrom
release-please--branches--main--changes--next

Conversation

@stainless-app

@stainless-app stainless-app Bot commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Automated Release PR

1.77.0 (2026-06-09)

Full Changelog: v1.76.0...v1.77.0

Features

Bug Fixes

  • client: add missing f-string prefix in file type error message (b931d8d)
  • use correct field name format for multipart file arrays (c18d9fa)

Chores

  • internal: codegen related update (816b839)
  • internal: reformat pyproject.toml (0a622b0)

This pull request is managed by Stainless's GitHub App.

The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.

For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.

🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions

@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from 46f336f to 6881f1c Compare April 24, 2026 00:21
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from 6881f1c to 81598b8 Compare April 27, 2026 22:29

@devin-ai-integration devin-ai-integration 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.

Devin Review found 1 potential issue.

View 2 additional findings in Devin Review.

Open in Devin Review

Comment on lines +204 to +211
custom_headers_env = os.environ.get("MODERN_TREASURY_CUSTOM_HEADERS")
if custom_headers_env is not None:
parsed: dict[str, str] = {}
for line in custom_headers_env.split("\n"):
colon = line.find(":")
if colon >= 0:
parsed[line[:colon].strip()] = line[colon + 1 :].strip()
default_headers = {**parsed, **(default_headers if is_mapping_t(default_headers) else {})}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚩 copy(set_default_headers=...) semantics changed by env header injection

The copy() method at src/modern_treasury/_client.py:521 passes headers to __init__(), which now re-reads MODERN_TREASURY_CUSTOM_HEADERS from the environment at line 204-211. When a user calls copy(set_default_headers={}) intending to clear all custom headers, env-derived headers would still be injected via {**parsed, **default_headers}. This is a semantic change to set_default_headers — previously it would result in zero custom headers, now env headers persist. This is likely intentional (env headers are always-on infrastructure config), but it's worth documenting since it changes the contract of set_default_headers. The same applies to the async client at line 664.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from 81598b8 to fb5fa8c Compare April 29, 2026 18:15
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from fb5fa8c to 2164c9b Compare April 30, 2026 00:22
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from 2164c9b to 4536df9 Compare April 30, 2026 16:24
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from 4536df9 to cdc0888 Compare April 30, 2026 20:58
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from cdc0888 to 4438585 Compare May 7, 2026 00:22
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from 4438585 to 3401eda Compare May 7, 2026 15:23
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from 3401eda to 426c7e1 Compare May 8, 2026 04:23
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from 426c7e1 to db0e123 Compare May 8, 2026 16:34
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from db0e123 to fd10854 Compare May 8, 2026 22:23
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from 233ae0c to 6db952d Compare May 12, 2026 23:23

@devin-ai-integration devin-ai-integration 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.

Devin Review found 1 new potential issue.

View 10 additional findings in Devin Review.

Open in Devin Review

Comment on lines +204 to +211
custom_headers_env = os.environ.get("MODERN_TREASURY_CUSTOM_HEADERS")
if custom_headers_env is not None:
parsed: dict[str, str] = {}
for line in custom_headers_env.split("\n"):
colon = line.find(":")
if colon >= 0:
parsed[line[:colon].strip()] = line[colon + 1 :].strip()
default_headers = {**parsed, **(default_headers if is_mapping_t(default_headers) else {})}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚩 Custom env headers could override security-sensitive headers

The new MODERN_TREASURY_CUSTOM_HEADERS env var at src/modern_treasury/_client.py:204-211 allows setting arbitrary headers. Since the env-parsed headers are spread first ({**parsed, **default_headers}), user-passed default_headers take priority, but the Authorization header (set separately in auth_headers at line 469-472) is merged later in the request pipeline and would override any env-set Authorization header. This means the env var cannot accidentally override auth — but it can still set other sensitive headers (e.g., X-Forwarded-For). This is likely acceptable since the user controls their own env, but it's worth documenting the security implications.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from 6db952d to fe6e959 Compare May 13, 2026 17:53
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from fe6e959 to dcc87cf Compare May 14, 2026 16:23
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from dcc87cf to a91d074 Compare May 15, 2026 04:23
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from a91d074 to e93f4bd Compare May 18, 2026 20:24
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from e93f4bd to 0e3d531 Compare May 20, 2026 22:23
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from 0e3d531 to 1498dd3 Compare May 27, 2026 04:23
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from 1498dd3 to b65f374 Compare May 27, 2026 16:23
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from b65f374 to a9c8cfd Compare May 27, 2026 18:23
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from a9c8cfd to 5b1894b Compare May 30, 2026 02:23

@devin-ai-integration devin-ai-integration 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.

Devin Review found 2 new potential issues.

View 11 additional findings in Devin Review.

Open in Devin Review

Comment on lines +28 to +38
amount: int
"""Value in specified currency's smallest unit.

e.g. $10 would be represented as 1000. Can be any integer up to 36 digits.
"""

amount_string: str
"""
The amount of the ledger entry as a string, preserving full precision for values
that may exceed safe integer limits in some languages.
"""

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚩 LedgerEntryCreateRequest.amount changed from Required to optional

In both src/modern_treasury/types/shared/ledger_entry_create_request.py and src/modern_treasury/types/shared_params/ledger_entry_create_request.py, amount was changed from a required field to optional (Optional[int] = None / non-Required). The new amount_string field is also optional. This means neither amount nor amount_string is required, which could allow creating a ledger entry with no amount specified. This appears to be an intentional API spec change (the server presumably validates that at least one is provided), but callers relying on the type system to enforce amount presence will no longer get that guarantee.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines -173 to -176
"USDB",
"USDC",
"USDG",
"USDP",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚩 Currency enum removes USDB and USDP stablecoin values

In both src/modern_treasury/types/shared/currency.py and src/modern_treasury/types/shared_params/currency.py, the USDB and USDP currency values were removed from the Currency type. If any existing API consumers are using these currency values, their code would still work at runtime (the values are just strings sent to the API), but type checkers would flag them. This is a potentially breaking change for users relying on these specific currencies.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from 5b1894b to 32b4c97 Compare June 1, 2026 20:23
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from 32b4c97 to 18aa125 Compare June 3, 2026 16:23
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from 18aa125 to 0d541c8 Compare June 4, 2026 16:23
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from 0d541c8 to dfb720c Compare June 9, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

0 participants