Do a better job of capturing org name in the metric#394
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b61e84a229
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if (orgName) { | ||
| logRequest(); | ||
| } |
There was a problem hiding this comment.
Preserve request metric for pre-secret failures
By gating logRequest() behind if (orgName) here, requests without an explicit org header no longer emit aiproxy.requests until much later in the flow. Any exception before the secrets callback or final tail logging (for example the vercel-ai non-stream validation error at streamFormat === "vercel-ai" && !isStreaming) now exits without ever recording a request, whereas the previous unconditional call counted these failed attempts. This regresses request-count accuracy for error/invalid traffic.
Useful? React with 👍 / 👎.
No description provided.