Skip to content

Conversation

@jhamon
Copy link
Collaborator

@jhamon jhamon commented Jan 10, 2026

This PR adds support for capturing caller information (provider and model) in the Pinecone client configuration. The caller info is formatted and included in the User-Agent header for all requests, enabling telemetry about which AI agents/callers are using the SDK.

Changes

  • Added optional caller property to PineconeConfiguration with structured object (provider?, model)
  • Updated buildUserAgent to format caller info as caller=provider:model (with provider) or caller=model (without provider)
  • Implemented normalization function similar to sourceTag handling
  • Added comprehensive tests for caller formatting, normalization, and edge cases

Example Usage

const pc = new Pinecone({
  apiKey: 'your-api-key',
  caller: {
    provider: 'google',
    model: 'gemini'
  }
});
// User-Agent: ...; caller=google:gemini

Note

Adds support for embedding normalized caller info in request User-Agent and validates it via config.

  • Introduces optional caller (provider?, model) to PineconeConfiguration and updates PineconeConfigurationProperties validation
  • Extends buildUserAgent to append caller=provider:model or caller=model with normalization; adds formatCaller and normalizeCallerString (lowercase, trim, space->_, replace : with _, restrict charset)
  • Updates tests: comprehensive user-agent specs for caller formatting, normalization, edge cases; adjusts constructor test error message to include caller in valid properties

Written by Cursor Bugbot for commit 2278fbd. This will update automatically on new commits. Configure here.

- Add optional caller property to PineconeConfiguration with provider and model
- Format caller info as caller=provider:model or caller=model
- Normalize caller strings similar to sourceTag handling
- Add comprehensive tests for caller formatting and normalization
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants