Google's promptTokenCount includes cachedContentTokenCount, so using it
directly as the input token count causes double-counting when calculateCost
multiplies input by the input rate AND cacheRead by the cacheRead rate.
The google-gemini-cli provider already handles this correctly (subtracting
cachedContentTokenCount from promptTokenCount), but google.ts and
google-vertex.ts were using the raw promptTokenCount.
This fix aligns both providers with the google-gemini-cli behavior.
The quoteInlineStyleContext used an empty stylePrefix, so after inline
elements (links, bold, code) closed their ANSI codes inside a blockquote,
the quote color was not re-applied. Text following a link rendered in
default foreground instead of the quote theme color.
Headings applied styling (bold+cyan) as an outer wrapper around the
result of renderInlineTokens. When inline elements like codespan emitted
ANSI resets, the outer heading style was killed and only the default
text style was restored via stylePrefix.
Fix: pass a heading-specific InlineStyleContext into renderInlineTokens
so each text segment gets heading styling directly, and stylePrefix
restores heading style after inline elements.
Add an optional requestMetadata field to BedrockOptions that forwards
key-value pairs to the Bedrock Converse API ConverseStreamCommand. Tags
appear in AWS Cost Explorer split cost allocation data, enabling callers
to attribute inference costs to specific applications or contexts.
Changes:
- Add requestMetadata?: Record<string, string> to BedrockOptions with
JSDoc documenting AWS constraints (max 50 pairs, key 64 chars, value
256 chars, no aws: prefix)
- Pass requestMetadata to commandInput via conditional spread to avoid
sending undefined when omitted
- Export BedrockOptions from package root (consistent with other
provider option types)
- Add E2E tests: metadata forwarded to SDK payload, and omitted when
not provided
closes#2510
cli-highlight's auto-detection misidentifies prose as AppleScript,
LiveCodeServer, etc., coloring random English words (if, but, and, the,
that, is) as keywords. This happens when code blocks have no language
specified: fenced blocks without a language tag, indented code blocks,
or unclosed fences during streaming.
Skip auto-detection entirely and apply plain mdCodeBlock styling instead.