Summary
I tested the following APIs directly through the Anna App Runtime:
- Create an
agent.session; - Run one request through that Session with
agent.session.run; - Run one
llm.completerequest for comparison.
The llm.complete response includes the actual model used, but the Agent Session create response, run acknowledgement, and stream frames from this run did not include an actual model field. As a result, the client can only see the model preference submitted in the request and cannot verify which model the server ultimately routed the request to.
Reproduction details
The test was performed in an Anna App local development environment, using the same user permissions and a simple text prompt. The examples below are the key RPC requests, responses, and stream frames captured by the client.
The Session was created with:
{
"submode": "auto",
"quotaCaps": {
"inherit_host_tools": false,
"allowed_tools": ["fs_read_file"]
}
}
The subsequent agent.session.run request was:
{
"app_session_uuid": "aps_kc4qbtiyfuktndila26hbs",
"content": "hi",
"modelPreferences": {
"hints": [
{ "name": "google/gemini-3-flash-preview" }
]
}
}
Session responses observed
1. agent.session.create response
{
"app_session_uuid": "aps_kc4qbtiyfuktndila26hbs",
"expires_in": 600,
"submode": "auto",
"fixed_client_id": null,
"granted_tools": []
}
There is no model or model_name field. This is understandable because no model inference has been executed at the time the Session is created.
2. Immediate agent.session.run response
{
"stream_id": "dev-1",
"run_id": "dev-1"
}
This response only provides stream and run identifiers; it does not include model information.
3. agent.session.run stream frames
The run_meta frame received when execution started was:
{
"event": "run_meta",
"run_id": "6ce81be3-a162-4d51-aabd-603d86fda4ae",
"app_session_uuid": "aps_kc4qbtiyfuktndila26hbs",
"submode": "auto",
"inherit_host_tools": false,
"granted_tools": ["fs_read_file"]
}
The task completion frame contained token usage:
{
"task_complete": {
"task_id": "95a86d5a-4213-470e-8f35-d174a61d7b47",
"status": "completed",
"token_usage": {
"total_calls": 1,
"total_prompt_tokens": 317,
"total_completion_tokens": 9,
"total_tokens": 326,
"total_estimated_cost": 0.000186,
"agent_turn_id": "e9ef90ff-589"
}
}
}
Neither run_meta nor task_complete contains model or model_name. The final text frame only contains the generated content:
{
"choices": [
{
"delta": {
"content": "Hello! How can I help you today?"
}
}
],
"event": "sse"
}
Comparison: llm.complete returns the actual model
For the same input, hi, the llm.complete response included:
{
"role": "assistant",
"content": {
"type": "text",
"text": "Hello! How can I help you today?"
},
"model": "google/gemini-3-flash-preview",
"stopReason": "endTurn",
"usage": {
"inputTokens": 1,
"outputTokens": 9,
"totalTokens": 10
},
"_meta": {
"provider": "openrouter",
"latencyMs": 1036,
"quotaConsumed": 0.023275862068965515,
"appSessionUuid": "aps_hq33od2vzgapjnbtfaxzhc"
}
}
This response explicitly reports model: "google/gemini-3-flash-preview".
The following field in the Session request:
"modelPreferences": {
"hints": [{ "name": "google/gemini-3-flash-preview" }]
}
only represents the model preference submitted by the client. It is not equivalent to the model ultimately used by the server. Routing may be affected by user authorization, model availability, or other server-side policies. If the server performs a fallback, the client currently has no way to detect it from the Session response.
Also, the appSessionUuid in the llm.complete response (aps_hq33...) is different from the raw Agent Session’s app_session_uuid (aps_kc4q...). Therefore, the model returned by llm.complete cannot be used to infer the actual model used by the raw Agent Session.
Impact
Without the actual model information, it is difficult to:
- Verify whether
modelPreferenceswas honored; - Detect model fallback or routing discrepancies;
- Reliably associate token usage, latency, and cost with a specific model;
- Debug output differences between models using server-side execution data rather than only the request parameters;
- Perform production auditing and troubleshooting with complete runtime metadata.
Expected behavior
Please expose the actual model used for every agent.session.run, in at least one of the following locations:
run_meta.modelorrun_meta.model_name;task_complete.modelortask_complete.model_name;- A standardized model field in the final completion frame.
It would also be helpful if the documentation clarified:
- Whether
modelPreferences.hintsis a preference or a hard requirement; - Whether fallback is allowed when the preferred model cannot be used;
- Which frame contains the actual model, including the field name and format;
- Whether an explicit “model unavailable” or “model not disclosed” status can be returned when the model cannot be exposed for policy reasons.
Since llm.complete already returns model, providing equivalent actual-model metadata for Agent Sessions would make the two invocation paths much easier to observe and troubleshoot consistently.
Correlation identifiers
The following identifiers may help with server-side investigation:
app_session_uuid:aps_kc4qbtiyfuktndila26hbsstream_id:dev-1run_id(from therun_metaframe):6ce81be3-a162-4d51-aabd-603d86fda4aetask_id:95a86d5a-4213-470e-8f35-d174a61d7b47agent_turn_id:e9ef90ff-589
I can provide the complete raw RPC log if needed.