Repository navigation
feat(agentstudio): support explicit local and review routing - #302
leonardocuco wants to merge 2 commits into
Conversation
…odies in base-url routing Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis 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. |
|
Claude Code wrote this comment. Claude Code reviewed this change at af26c4c for the author: 9 findings, 3 fixed, 1 not a bug, 5 left.
Tests, vet and gofmt pass for the changed package. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: af26c4c01b
ℹ️ 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 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 address that feedback".
| func (r agentStudioHTTPClient) Request(req *http.Request, _, _ time.Duration) (*http.Response, error) { | ||
| return r.client.Do(req) |
There was a problem hiding this comment.
Preserve request timeouts in the custom HTTP requester
When a local or review backend accepts a connection but stalls while serving a response, this adapter discards both timeout arguments supplied by the SDK and calls http.Client.Do without applying them. The Agent Studio command handlers do not attach their own context deadlines, so override requests no longer respect the SDK's per-attempt timeout settings and can hang instead of failing promptly. Preserve the SDK request and connection timeout handling while disabling redirects.
Useful? React with 👍 / 👎.
Problem
The Agent Studio SDK uses
/agent-studio/1/...paths and the CLI cannot target a local or review backend. A host-only override would send the wrong paths to the direct API and could leave the existing Search ACL preflight pointed at an unexpected environment.Change
agentstudio --base-urlfor an explicit HTTPS endpoint or loopback HTTP endpoint. Its path replaces the SDK's/agent-studioprefix, supporting both direct/1/...routes and a proxy prefix.--search-hosts, reject conflicts withALGOLIA_SEARCH_HOSTS, and fail before a request for malformed or ambiguous destinations. Both endpoints receive the configured credentials.The inspected local backend snapshot enforces route-specific ACLs: agent and provider configuration routes check settings/editSettings and conversation operations check logs (or the secured-token path). The CLI preflight remains in place; this PR does not claim that a particular review or production deployment has been verified.
Verification
go generate ./...go test ./...go build ./...git diff --cached --checkRelated to CEC-1883. No release or deployment during the code freeze. A live-environment check remains for CEC-1890 after the freeze.