cloudflare / cloudflare/ai

AI gateway logging delay?

Open
#255 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.2k
Forks
345
Avg merge
13h 31m
Merged PRs (30d)
1

Description

It's not documented that how long does it take to appear AI gateway logs on API?

I used the `getLogsById()` in `waitUntil` immediately after the /ai response and the `response_head` is coming as null

When, I checked the same log id via postman after few seconds, the data is available there. So seems like the request, response head data is later updated in logs. But after how long, can you please confirm and update in documents as well?

**Code**

Image

**Postman **

Image

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the AI gateway API documentation and the getLogsById() flow described in the issue, then reproduce the request immediately after an /ai response. Confirm when response_head becomes available and document that logging delay and expected behavior for API users.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.