feat: add --runtime to notte functions run - #98
Merged
Conversation
The regenerated spec grew a `runtime` field on RunFunctionRequest (standard uses Lambda, extended the configured AgentCore runtime), but `functions run` bypasses the generated client and hand-builds its body, so the field was unreachable from the CLI. Send it only when asked, like --no-stream: the server picks the runtime otherwise, and transmitting its current choice would pin it. Reject an unknown value locally so a typo costs a message rather than a 422. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
--runtime standard|extendedtonotte functions run.Why
The regenerated spec in #97 grew a
runtimefield onRunFunctionRequest:But
functions runbypasses the generated client and hand-builds its request body (internal/cmd/functions.go, themanual POST /functions/{function_id}/runs/startentry inendpoint-coverage.txt), so the field was unreachable from the CLI — regenerating alone never surfaces it.functions runalso has no*_flags.gen.go, so the flag generator won't pick it up on a future regen either.How
--no-stream: the server picks the runtime otherwise, and transmitting its current choice would pin today's behaviour into the client.invalid --runtime "lambda": expected standard or extended) rather than becoming a 422. The two values reference the generatedapi.Standard/api.Extendedconstants, but the set is hand-written — if the spec grows a third runtime, the switch needs an edit. Flagged in a comment at the site.Testing
TestFunctionRun_SendsRuntimeOnlyWhenSet— omit / standard / extendedTestFunctionRun_RejectsUnknownRuntime— asserts no request is sent on a bad valuego test ./...,make check-endpoints,make check-skills,make lintall clean on top of main.Note for reviewers
Unrelated but adjacent: the hand-built body sends
"function_id", while the spec'sRunFunctionRequestdeclaresworkflow_id. Either the API accepts both or the field is ignored and the path ID is what counts. Deliberately not touched here — worth confirming before more fields go into that map.🤖 Generated with Claude Code