These test files validate the Braintrust SDK's integration with different AI providers by running comprehensive test suites that cover various LLM features.
Each test suite validates:
- Basic and multi-turn completions
- System prompts
- Streaming responses
- Image and document inputs
- Temperature and sampling parameters
- Stop sequences and metadata
- Tool use and function calling
- Mixed content types
Run a specific golden suite from its directory, for example:
cd langchain-py-v1
python langchain.pycd pydantic-ai-v1
python pydantic_ai_test.pyBefore running a suite, ensure you have the appropriate API keys set as environment variables for that provider, along with BRAINTRUST_API_KEY if you want to log traces to Braintrust.
To add tests for a new AI provider:
- Use an existing golden suite as a reference implementation
- Ensure all test cases are covered with provider-specific adaptations
- Follow the naming convention already used by the surrounding suites
When adding a new feature (like reasoning, extended context, or new modalities):
- Add the test case to existing golden test files
- Ensure consistency in test structure and naming across providers
- Update this README to document the new feature coverage
This helps maintain broad feature coverage across the remaining golden suites.