Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Principle:Wandb Weave Integration Configuration

From Leeroopedia
Knowledge Sources
Domains Instrumentation, Configuration
Last Updated 2026-02-14 00:00 GMT

Overview

A per-provider configuration mechanism that controls how individual LLM integrations are patched and traced.

Description

Integration Configuration allows users to explicitly enable, disable, or customize tracing for specific LLM providers. Each provider has a dedicated patch_*() function that accepts IntegrationSettings for fine-grained control over op settings (sampling rate, display names, etc.).

Usage

Use this principle when you need explicit control over which providers are traced or when configuring provider-specific tracing settings. This is an alternative to the automatic patching provided by weave.init().

Theoretical Basis

Provider-specific configuration follows the strategy pattern:

  1. Each integration has a dedicated patch function (patch_openai, patch_anthropic, etc.).
  2. The function accepts IntegrationSettings to customize behavior.
  3. Patched integrations are tracked in a global set (_PATCHED_INTEGRATIONS) to prevent double-patching.
  4. The _patch_integration helper centralizes the logic: import the provider module, call its patcher getter function, and apply MultiPatcher.attempt_patch().

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment