Add support for token usage reporting for Azure endpoint
Resolved 💬 4 comments Opened Sep 6, 2025 by eugene-kim Closed Feb 12, 2026
What version of Codex is running?
codex-cli 0.29.0
Which model were you using?
gpt-5
What platform is your computer?
Darwin 24.6.0 arm64 arm
What steps can reproduce the bug?
Use an azure deployment. Here's my config.toml (deployment name redacted):
model_provider = "azure"
model = "gpt-5"
[model_providers.azure]
name = "Azure"
base_url = "https://redacted.openai.azure.com/openai/deployments/gpt-5"
env_key = "AZURE_OPENAI_API_KEY"
query_params = { api-version = "2024-12-01-preview" }
# wire_api = "chat"
model_reasoning_summary = "detailed"
What is the expected behavior?
I should see tokens used in the session after I send messages.
What do you see instead?
📂 Workspace
• Path: ~/Projects/ti
• Approval Mode: on-request
• Sandbox: workspace-write
• AGENTS files: AGENTS.md
🧠 Model
• Name: gpt-5
• Provider: Azure
📊 Token Usage
• Session ID: a249b4c6-57e0-4a3c-8288-428ee9b323de
• Input: 0
• Output: 0
• Total: 0
Additional information
I also don't see context remaining either.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗