Repository navigation
v1.3.5
A patch release. Upgrade with pip install -U promptise.
Highlights: a code-action run that cannot fit its tool-call budget now raises CodeActionBudgetError instead of answering from partial data, and the model is no longer told the cap in a way that makes it cut its own work short; MCP server audit entries carry the error code the client received (ACCESS_DENIED vs AUTHENTICATION_ERROR and so on). Read Changed before upgrading.
Fixed
- Code-action: a
max_tool_callstoo small for the job gave a wrong answer, not an error -- the prompt said "the program may make at most N function calls ... so plan the calls you need", so models counted their own calls and stopped early (if calls >= 50: break,orders = orders[:49]): the program never reached the cap, exited cleanly, and its partial result was the answer (3 of 46 benchmark programs did this at the default budget). And after a program did reach the cap, the repair asked for "a program that needs at most N calls", so the model wrote one that read only the first N records, which succeeded (5 of 5 runs of the guide'smax_tool_calls=20demo answered wrong, none raised). The prompt now says each program has a call cap but not its value, and tells the model never to skip, sample or truncate records, never to count its calls, and to letToolBudgetExceededraise; the error a refused call raises in the program no longer gives the value either. The repair after a budget hit asks for a program that does the whole job with fewer calls (batch tools, no repeated fetches) or the replyCANNOT_FINISH_WITHIN_CALL_CAP. That reply, or a budget hit with no repair left, raises the newCodeActionBudgetError(see Changed). An answer from a program written after a budget hit is logged at WARNING. Promptise still cannot tell whether a program that stays within the cap read all the data; the guide says so. - Audit log: a role or guard denial was recorded as an authentication failure -- a guard denial raises
AuthenticationErrorwithcode="ACCESS_DENIED", and the client gotACCESS_DENIED, butAuditMiddlewarerecorded onlyerror: "AuthenticationError: ...", so a verified caller without the role read exactly like a failed login, and anyone counting failed logins witherror.startswith("AuthenticationError")counted every denial. An entry for a call that raised anMCPErrornow also haserror_code, the code the client received (ACCESS_DENIED,AUTHENTICATION_ERROR,VALIDATION_ERROR,RATE_LIMIT_EXCEEDED,TOOL_ERROR, ...).erroris unchanged.error_codeis inside the HMAC chain; logs written by earlier versions have noerror_code, still verify, and a 1.3.5 server continues their chain. The audit docs now also say that withrequire_auth=True, a request with a missing or invalid token is rejected with401by the HTTP gate before the MCP layer, so it is only in the HTTP access log, never in the audit log (by design, unchanged).
Changed
- New
CodeActionBudgetError(promptise.engine) -- a code-action run that cannot do the job withinmax_tool_callsraises it, withmax_tool_calls,attemptsandreport. It is aGraphExecutionError, so existing handlers still catch it; budget failures that raised a plainGraphExecutionErrorin 1.3.4 raise this subclass. The code-action prompt and repair message changed (see Fixed): a model that would have answered from part of the data now ends the run with this error.
Full changelog: https://github.com/promptise-com/Foundry/blob/main/CHANGELOG.md