
Explanation:
The subscription will be charged 86 tokens for the execution of the session. No The text completion was truncated because the Max response tokens value was exceeded. No The prompt_tokens value will be included in the calculation of the Max response tokens value. No From the response payload:
usage.prompt_tokens = 37
usage.completion_tokens = 86
usage.total_tokens = 123
finish_reason = " stop "
Billing is for total tokens (input + output), not just completion tokens.
Azure OpenAI bills on both prompt (input) and completion (output) tokens. Here, the total is 123 tokens, so it is not just 86. Hence No.
Not truncated by max response tokens.
If a response hits the maximum allowed output tokens, finish_reason would be " length " . Here it is " stop " and the model produced only 86 completion tokens while Max response tokens was set to 100, so the limit was not reached. Hence No.
max response tokens applies only to the generated output, not the prompt.
max_tokens (Max response tokens) limits the number of tokens the model may generate in the completion; it does not include prompt_tokens . Hence No.
Microsoft References
Azure OpenAI Service - Chat Completions API (parameters, max_tokens , response usage , finish_reason ).
https://learn.microsoft.com/azure/ai-services/openai/reference#chat-completions Azure OpenAI pricing and token usage model (charges for input and output tokens).
https://learn.microsoft.com/azure/ai-services/openai/overview#pricing
Token counting and limits (context vs. max output tokens).
https://learn.microsoft.com/azure/ai-services/openai/concepts/tokenizers#token-limits