Sources not being returned #62

Open
opened 2026-02-13 17:27:45 -06:00 by mirrors · 0 comments
Owner

Originally created by @ghost on GitHub (Jun 3, 2025).

Hey @HanaokaYuzu, thanks for your work on this!

I was testing out the library locally and unfortunately it seems like it doesn't trigger the source generation.

e.g. this query "What is facebook.com?" should return also a list of sources which you can see if you manually input that in the gemini interface and press input:

Image

Instead if you run it from the library, it does return the text output, but not the sources and links. You can even confirm by going to the generated chat and checking the UI.

Image

I've did a bit of research and it seems to be associated to a few (2) additional values which are sent in the body of the request to /StreamGenerate - specifically in the f.req field. Unfortunately I couldn't figure out how and where these tokens are being generated (one just seems to be the md5 of the query, but couldn't find the origin of the longer one starting with the !, but they change with every request.

Would appreciate if you can take a look at this since it seems like a pretty important feature.

Thanks!

Originally created by @ghost on GitHub (Jun 3, 2025). Hey @HanaokaYuzu, thanks for your work on this! I was testing out the library locally and unfortunately it seems like it doesn't trigger the source generation. e.g. this query "What is facebook.com?" should return also a list of sources which you can see if you manually input that in the gemini interface and press input: <img width="752" alt="Image" src="https://github.com/user-attachments/assets/353435ad-5aec-411d-8fd2-61e92513cd42" /> Instead if you run it from the library, it does return the text output, but not the sources and links. You can even confirm by going to the generated chat and checking the UI. <img width="794" alt="Image" src="https://github.com/user-attachments/assets/a056b0f2-c01f-4da2-9753-dc4cdf48920e" /> I've did a bit of research and it seems to be associated to a few (2) additional values which are sent in the body of the request to `/StreamGenerate` - specifically in the `f.req` field. Unfortunately I couldn't figure out how and where these tokens are being generated (one just seems to be the md5 of the query, but couldn't find the origin of the longer one starting with the `!`, but they change with every request. Would appreciate if you can take a look at this since it seems like a pretty important feature. Thanks!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mirrors/Gemini-API#62
No description provided.