Skip to content

Add max_total_charge_usd to task start() and call() #1096

Description

@vdusek

POST /v2/actor-tasks/{actorTaskId}/runs accepts maxTotalChargeUsd, and the JS client sends it from task.start(). TaskClient and TaskClientAsync don't take it in start() or call(), so a task run can't be given a charge limit.

Add max_total_charge_usd: Decimal | None = None to both methods in both classes, as in ActorClient.start() and call().

The SDK needs it for apify/apify-sdk-python#1155, where named child runs share the parent's charge budget. A named Actor.call_task() under a budget set by the user raises RuntimeError for now, since the task run can't get a limit.

✍️ Drafted by Claude Code

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request.t-toolingIssues with this label are in the ownership of the tooling team.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions