feat(api): generate and migrate Function REST resources - #758
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9094cce1bc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "Codex (@codex) review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".
9094cce to
8952466
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 895246601b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "Codex (@codex) review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".
### AI Summary Implements the Function metadata slice of #683 by publishing the six CRUD operations tagged Functions and moving `load_parameters()` retrieval onto the public REST resources. Function request and response models are also exported through the public API. `postFunctionIdInvoke` remains on the specialized invocation path because it requires proxy routing, streaming, invocation-specific request shaping, and sync/async behavior outside the generic REST resource contract. ### Migration flow ```text Before load_parameters(id=...) ------> raw GET /v1/function/{id} load_parameters(slug=...) ----> raw GET /v1/function After load_parameters(id=...) ------> generated GET /v1/function/{id} load_parameters(slug=...) ----> generated GET /v1/function ``` | SDK workflow | Previous wire call | Public REST call | | --- | --- | --- | | Load by ID | Raw `GET /v1/function/{id}` | Generated `GET /v1/function/{id}` | | Load by project and slug | Raw `GET /v1/function` | Generated `GET /v1/function` | | Function metadata CRUD | No generated resource | `client.openapi.functions` | | Behavior | Result | | --- | --- | | Explicit credentials | Use isolated, cached generated clients without mutating global login | | Active global login | Reuse the existing generated API client and transport | | Version and environment | Explicit version continues to take precedence over environment | | Cache fallback | Preserve local parameter cache fallback for retryable server failures | | Retry behavior | GET operations are safe reads; writes are not retried | | Invocation | Continue using the specialized proxy and streaming implementation | | Type names | Keep the REST model as `Function` and contextually name nested tool-call models | | Wire keys | Preserve `__schema` without Python name mangling | Refs #683
8952466 to
9e49307
Compare
AI Summary
Implements the Function metadata slice of #683 by publishing the six CRUD operations tagged Functions and moving
load_parameters()retrieval onto the public REST resources. Function request and response models are also exported through the public API.postFunctionIdInvokeremains on the specialized invocation path because it requires proxy routing, streaming, invocation-specific request shaping, and sync/async behavior outside the generic REST resource contract.Migration flow
| SDK workflow | Previous wire call | Public REST call | | --- | --- | --- |
| Load by ID | Raw
GET /v1/function/{id}| GeneratedGET /v1/function/{id}| | Load by project and slug | RawGET /v1/function| GeneratedGET /v1/function| | Function metadata CRUD | No generated resource |client.openapi.functions|Refs #683