Skip to content

feat: add request visibility controls and option passthrough#320

Open
josevelaz wants to merge 4 commits intoSoju06:mainfrom
josevelaz:main
Open

feat: add request visibility controls and option passthrough#320
josevelaz wants to merge 4 commits intoSoju06:mainfrom
josevelaz:main

Conversation

@josevelaz
Copy link
Copy Markdown

@josevelaz josevelaz commented Apr 3, 2026

Summary

  • add dashboard request-visibility capture, redaction, settings controls, and drawer UX so admins can enable request inspection from the UI and inspect request metadata, headers, body details, and errors
    r- eserve more useful captured metadata under truncation, surface requested
  • priority state in the requests table, and document OpenCode/OpenAI option passthrough behavior in the README
  • normalize OpenAI-compatible option aliases like serviceTier for request forwarding while keeping provider options compatible with upstream Responses requests

Ive been testing it myself and haven't run into any issues so far
Addresses #291

…ty-ui-toggle

# Conflicts:
#	frontend/src/features/dashboard/components/recent-requests-table.test.tsx
#	frontend/src/features/dashboard/components/recent-requests-table.tsx
feat: add request visibility controls and option passthrough
@Soju06
Copy link
Copy Markdown
Owner

Soju06 commented Apr 3, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fc94527233

ℹ️ 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".

Comment on lines +86 to +88
return {
"headers": captured_headers,
"body": {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Enforce max-bytes cap when headers dominate payload

When request visibility capture is enabled, build_request_visibility_document can still return a blob larger than max_bytes if an allowlisted header (for example a very large User-Agent) dominates size, because only body is truncated and the final fallback returns captured_headers unchanged. In that scenario the advertised 16KB cap is bypassed, so repeated requests can write unexpectedly large request_visibility rows and bloat storage/log payloads.

Useful? React with 👍 / 👎.

request_visibility_duration_minutes=payload.request_visibility_duration_minutes,
)
)
except ValueError as exc:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3 Badge Return a visibility-specific validation error code

The settings API now surfaces request-visibility validation failures from SettingsService.update_settings (for example, temporary mode without a duration), but the except ValueError path still maps every such failure to code="invalid_totp_config". This gives clients a misleading machine-readable error for non-TOTP failures, which breaks reliable client-side handling and user messaging for request-visibility settings errors.

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants