Skip to content

[SSR Agent] Issue Fix (289): Document promptTokenCount and candidatesTokenCount in LLMResponse schema - #291

Open
joneba-google wants to merge 1 commit into
mainfrom
ssr-agent-289
Open

[SSR Agent] Issue Fix (289): Document promptTokenCount and candidatesTokenCount in LLMResponse schema#291
joneba-google wants to merge 1 commit into
mainfrom
ssr-agent-289

Conversation

@joneba-google

Copy link
Copy Markdown
Collaborator

fixes #289
Original issue URL: #289

Context & Problem

The hooks reference documentation listed LLMResponse.usageMetadata as containing only totalTokenCount, omitting promptTokenCount and candidatesTokenCount despite these being returned by actual model response interfaces in hooks (e.g., BeforeModel or AfterModel). This mismatch leaves integrators unaware of detailed token breakdown availability.

Detailed Changes

  • Modify reference.md under docs/hooks to update the LLMResponse schema definition.
  • Specifically, update the usageMetadata object within LLMResponse to document promptTokenCount and candidatesTokenCount alongside totalTokenCount.

Verification

  • Inspected and verified that reference.md correctly contains the updated fields.
  • Verified that the updated documentation aligns with the TS interface for HookLLMResponse/LLMResponse in hookTranslator.ts.

@github-actions github-actions Bot added the size/XS XS: <10 lines changed label Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

📊 PR Size: size/XS

  • Lines changed: 6
  • Additions: +5
  • Deletions: -1
  • Files changed: 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS XS: <10 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(hooks): LLMResponse usageMetadata in the reference omits promptTokenCount and candidatesTokenCount (the hook receives all three)

1 participant