Skip to content

[Bug] cannot access the citation from openrouter #5884

@MSNP1381

Description

@MSNP1381

Description

i had this issue that i call the openrouter model with ':online' suffix like google/gemini-3-flash-preview:online and the client of the OpenAI gets the response as annotations*.citations but it doesn't map to the output response

Steps to Reproduce

from agno.agent import Agent
from agno.models.openrouter import OpenRouter

agent = Agent(
model=OpenRouter(id="google/gemini-3-flash-preview"),
markdown=True
)
response=await agent.arun("Weather in Berlin and latest news of today")
print(response.citations)

Agent Configuration (if applicable)

from agno.agent import Agent
from agno.models.openrouter import OpenRouter

agent = Agent(
    model=OpenRouter(id="google/gemini-3-flash-preview"),
    markdown=True
)
response=await agent.arun("Weather in Berlin and latest news of today")
print(response.citations)

Expected Behavior

to get the response's citation as messages.Citation.urls* object as having data in it

Actual Behavior

to get the response's citation as messages.Citation.urls* object as having No data in it

Screenshots or Logs (if applicable)

No response

Environment

- OS: Ubuntu 20.04
- reqs : agno==2.2.1,openai=2.9.0
- python : 3.10.2

Possible Solutions (optional)

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions