From 3452e0d037b85f4621382512f1fe108874f54794 Mon Sep 17 00:00:00 2001 From: Scarlett Attensil Date: Mon, 28 Sep 2026 12:10:08 -0700 Subject: [PATCH 01/12] Roll the offline-evals tutorial forward to the current Python AI SDK. Carries the agent-graphs migration onto this branch: launchdarkly-ai-server in place of LDAIClient, plain dicts for configs and contexts, GraphTracker emitting the graph events by hand, and fallbacks applied in get_config because the SDK has no `default=` parameter. Three of the four files applied unchanged from that branch; only config_manager needed resolving. This branch already had get_agent_graph, which agent-graphs was missing entirely. Its signature matches the one inferred there, which is the useful confirmation: the contract was (user_id, graph_key, user_context) returning the graph, with the caller pulling a tracker off it. The migrated version returns (graph, tracker) instead, because resolve_graph returns topology only and there is no get_tracker() to call. clear_cache is kept from this branch. It is a no-op, but it is part of this branch's config manager surface and dropping it would break callers. The graph event keys change with this, as on agent-graphs: $ld:ai:graph:handoff -> handoff_success / handoff_failure $ld:ai:graph:invocation -> invocation_success / invocation_failure $ld:ai:graph:total -> total_tokens $ld:ai:tool -> tool_call Metrics keyed on the old names need recreating. graph:redirect and the per-node invocation event have no replacement. Requires Python 3.12+, the launchdarkly-ai-server floor. Pinned to launchdarkly-ai-server 0.2.4, the current release. Nothing this migration relies on changed in it, and parse_usage still reports zero for a provider native token spelling, so the explicit key renaming is still needed. .python-version was still 3.11 against a requires-python of >=3.12, which blocked uv from locking at all. 0.2.4 retires $ld:ai:graph:path in favour of one $ld:ai:graph:node per node entered, so GraphTracker now emits that from track_node_invocation, where the service already announces each node. The ordered series of those events is the path. track_path is kept as a log-only no-op so agent_service does not change. Any LaunchDarkly metric built on $ld:ai:graph:path needs recreating against $ld:ai:graph:node before this branch reports a path at all. --- .python-version | 2 +- agents/generic_agent.py | 29 +-- agents/ld_agent_helpers.py | 102 +++++----- api/services/agent_service.py | 63 +++---- config_manager.py | 291 +++++++++++++++++++++------- pyproject.toml | 8 +- uv.lock | 345 +++------------------------------- 7 files changed, 342 insertions(+), 498 deletions(-) diff --git a/.python-version b/.python-version index 2c07333..e4fba21 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.11 +3.12 diff --git a/agents/generic_agent.py b/agents/generic_agent.py index 6bd3fb1..57e651e 100644 --- a/agents/generic_agent.py +++ b/agents/generic_agent.py @@ -25,7 +25,6 @@ def create_generic_agent(agent_config, config_manager, valid_routes: List[str] = wrap_tool_with_counter, ToolCallCounter ) from tools_impl.dynamic_tool_factory import create_dynamic_tools_from_launchdarkly - from ldai.tracker import TokenUsage import time class GenericAgent: @@ -37,20 +36,25 @@ def __init__(self): async def ainvoke(self, state: dict) -> dict: """Execute the agent using LaunchDarkly config.""" - if not agent_config.enabled: + # Configs are plain dicts now. A node in an enabled graph always + # has one; an empty config means nothing was served. + if not agent_config: log_student(f"AGENT DISABLED: skipping") return {"response": "", "_skipped": True} + model_cfg = agent_config.get("model") or {} + provider_name = (agent_config.get("provider") or {}).get("name") + try: # Create model from config model = create_model_for_config( - provider=agent_config.provider.name, - model=agent_config.model.name, + provider=provider_name, + model=model_cfg.get("name"), config_manager=config_manager, temperature=0.3 ) - log_student(f"CONFIG: {agent_config.provider.name} - {agent_config.model.name}") + log_student(f"CONFIG: {provider_name} - {model_cfg.get('name')}") # Load tools from LaunchDarkly config self.tools = create_dynamic_tools_from_launchdarkly(agent_config) @@ -60,7 +64,7 @@ async def ainvoke(self, state: dict) -> dict: log_student(f"TOOLS: {[t.name for t in self.tools]}") # Get instructions from config - instructions = agent_config.instructions or "Process the input and provide a helpful response." + instructions = agent_config.get("instructions") or "Process the input and provide a helpful response." # If this node has outgoing edges with routes, inject route options into instructions if self.valid_routes: @@ -81,21 +85,18 @@ async def ainvoke(self, state: dict) -> dict: else: result = await self._execute_simple(model, instructions, messages) - # Track metrics + # No tracker here any more. The caller emits this node's + # duration and success/error, because it holds the graph + # tracker and the node key -- and because the old code emitted + # $ld:ai:duration:total from here while agent_service emitted + # it for the same node, double-counting every node's duration. duration_ms = int((time.time() - start_time) * 1000) - agent_config.tracker.track_duration(duration_ms) - agent_config.tracker.track_success() - log_student(f"DURATION: {duration_ms}ms") - if "_token_usage" in result and result["_token_usage"]["total"] > 0: - agent_config.tracker.track_tokens(TokenUsage(**result["_token_usage"])) - return result except Exception as e: log_student(f"AGENT ERROR: {e}") - agent_config.tracker.track_error() return { "response": f"Error: {e}", "_error": str(e) diff --git a/agents/ld_agent_helpers.py b/agents/ld_agent_helpers.py index 2785ade..8eef8f3 100644 --- a/agents/ld_agent_helpers.py +++ b/agents/ld_agent_helpers.py @@ -8,7 +8,6 @@ from typing import List, Any, Tuple from langchain.chat_models import init_chat_model from langgraph.prebuilt import create_react_agent -from ldai.tracker import TokenUsage from utils.logger import log_student from langchain_aws import ChatBedrockConverse from langchain_core.tools import StructuredTool @@ -145,36 +144,37 @@ async def counted_arun(**kwargs) -> str: ) -async def track_langgraph_metrics_async(tracker, coro, prev_message_count=0): - """Track duration and tokens for async agent invocations.""" +async def collect_langgraph_usage_async(coro, prev_message_count=0): + """Run an agent invocation and attach its token usage to the result. + + This was track_langgraph_metrics_async, which took a tracker and emitted + duration, success, tokens, and error itself. There is no tracker any more, + and the caller that owns the graph tracker emits those events, so this only + measures and reports. + + The duration is logged rather than emitted for the same reason: emitting it + here as well as in the traversal is what double-counted it before. + """ start_time = time.time() - try: - result = await coro - duration_ms = int((time.time() - start_time) * 1000) - tracker.track_duration(duration_ms) - tracker.track_success() - log_student(f"AGENT: duration={duration_ms}ms") - - # Extract tokens from new messages - total_in, total_out, total = 0, 0, 0 - if "messages" in result: - for msg in result['messages'][prev_message_count:]: - if hasattr(msg, "usage_metadata") and msg.usage_metadata: - usage = msg.usage_metadata - total_in += usage.get("input_tokens", 0) - total_out += usage.get("output_tokens", 0) - total += usage.get("total_tokens", 0) - - if total > 0: - tracker.track_tokens(TokenUsage(input=total_in, output=total_out, total=total)) - log_student(f"AGENT TOKENS: {total} ({total_in} in, {total_out} out)") - - result["_token_usage"] = {"input": total_in, "output": total_out, "total": total} - return result - - except Exception: - tracker.track_error() - raise + result = await coro + duration_ms = int((time.time() - start_time) * 1000) + log_student(f"AGENT: duration={duration_ms}ms") + + # Extract tokens from new messages + total_in, total_out, total = 0, 0, 0 + if "messages" in result: + for msg in result['messages'][prev_message_count:]: + if hasattr(msg, "usage_metadata") and msg.usage_metadata: + usage = msg.usage_metadata + total_in += usage.get("input_tokens", 0) + total_out += usage.get("output_tokens", 0) + total += usage.get("total_tokens", 0) + + if total > 0: + log_student(f"AGENT TOKENS: {total} ({total_in} in, {total_out} out)") + + result["_token_usage"] = {"input": total_in, "output": total_out, "total": total} + return result async def create_agent_with_fresh_config( @@ -199,32 +199,32 @@ async def create_agent_with_fresh_config( # Create model from utils.bedrock_helpers import normalize_bedrock_provider - normalized = normalize_bedrock_provider(config.provider.name) + # Configs are plain dicts now. + provider_name = (config.get("provider") or {}).get("name") or "" + model_cfg = config.get("model") or {} + normalized = normalize_bedrock_provider(provider_name) langchain_provider = map_provider_to_langchain(normalized) if langchain_provider == 'bedrock' and os.getenv('AUTH_METHOD', '').lower() == 'sso': if not hasattr(config_manager, 'boto3_session') or not config_manager.boto3_session: raise ValueError("Bedrock SSO requires AWS session. Run: aws sso login") llm = create_bedrock_chat_model( - model_id=config.model.name, + model_id=model_cfg.get("name"), session=config_manager.boto3_session, region=config_manager.aws_region ) - log_student(f"ROUTING: Bedrock SSO - {config.model.name}") + log_student(f"ROUTING: Bedrock SSO - {model_cfg.get('name')}") else: - fallback = 'anthropic' if config.provider.name.lower() == 'anthropic' else langchain_provider - llm = init_chat_model(model=config.model.name, model_provider=fallback) - log_student(f"ROUTING: {fallback} - {config.model.name}") + fallback = 'anthropic' if provider_name.lower() == 'anthropic' else langchain_provider + llm = init_chat_model(model=model_cfg.get("name"), model_provider=fallback) + log_student(f"ROUTING: {fallback} - {model_cfg.get('name')}") # Get max_tool_calls from config max_tool_calls = 5 - try: - config_dict = config.to_dict() - custom = config_dict.get('model', {}).get('custom', {}) - if 'max_tool_calls' in custom: - max_tool_calls = int(custom['max_tool_calls']) - except Exception: - pass + # model.custom is a public key now; to_dict() is gone. + custom = model_cfg.get('custom') or {} + if 'max_tool_calls' in custom: + max_tool_calls = int(custom['max_tool_calls']) # Wrap tools with counter counter = ToolCallCounter(max_calls=max_tool_calls) @@ -236,10 +236,12 @@ async def create_agent_with_fresh_config( agent = create_react_agent( model=llm, tools=wrapped_tools, - prompt=config.instructions + prompt=config.get("instructions") ) - return agent, config.tracker, False, recursion_limit + # The second element was config.tracker. There is no tracker, and the + # caller emits this node's events, so the config is returned instead. + return agent, config, False, recursion_limit except Exception as e: log_student(f"ERROR creating agent: {e}") @@ -282,18 +284,10 @@ async def ainvoke(self, request_data: dict) -> dict: initial_state = {"messages": messages} prev_count = len(messages) - # Use graph node tracker if available - active_tracker = ( - graph_node_config.tracker - if graph_node_config and hasattr(graph_node_config, 'tracker') - else tracker - ) - _rate_limit_llm_call() try: - response = await track_langgraph_metrics_async( - active_tracker, + response = await collect_langgraph_usage_async( agent.ainvoke(initial_state, {"recursion_limit": recursion_limit}), prev_count ) diff --git a/api/services/agent_service.py b/api/services/agent_service.py index c133e53..5714cab 100644 --- a/api/services/agent_service.py +++ b/api/services/agent_service.py @@ -15,7 +15,6 @@ from typing import Dict, Any from langchain_core.messages import HumanMessage from dotenv import load_dotenv -from ldai.tracker import TokenUsage from ..models import ChatResponse, AgentConfig as APIAgentConfig from config_manager import FixedConfigManager as ConfigManager from utils.logger import log_student @@ -47,9 +46,11 @@ async def execute_with_graph( sanitized_history: list = None ) -> Dict[str, Any]: """Execute agents by traversing the LaunchDarkly Agent Graph.""" - graph = self.config_manager.get_agent_graph(user_id, graph_key, user_context) + # get_agent_graph is async now and returns the tracker alongside the + # topology, because resolve_graph records nothing on its own. + graph, graph_tracker = await self.config_manager.get_agent_graph(user_id, graph_key, user_context) - if not graph.is_enabled(): + if not graph.enabled: raise ValueError(f"Agent Graph '{graph_key}' is not enabled") # Shared context - generic, no agent-specific fields @@ -66,17 +67,19 @@ async def execute_with_graph( "total_output_tokens": 0, } - graph_tracker = graph.get_tracker() graph_start_time = time.time() execution_path = [] # Build node lookup nodes = {} - graph.reverse_traverse(lambda node, _: nodes.update({node.get_key(): node}), {}) + # Nodes expose `key` as an attribute rather than a get_key() method, + # and reverse_traverse is a coroutine -- without the await the lookup + # silently stays empty and every handoff target looks unknown. + await graph.reverse_traverse(lambda node, _: nodes.update({node.key: node}), {}) log_student(f"GRAPH: '{graph_key}' with {len(nodes)} nodes: {list(nodes.keys())}") try: - current_node = graph.root() + current_node = graph.root if not current_node: raise ValueError("Agent graph has no root node") @@ -86,7 +89,7 @@ async def execute_with_graph( # Traverse until terminal node while current_node: - node_key = current_node.get_key() + node_key = current_node.key # Safety checks if node_key in visited: @@ -96,7 +99,7 @@ async def execute_with_graph( if hop_count > MAX_HOPS: raise ValueError(f"Max hops exceeded: {hop_count}") - config = current_node.get_config() + config = current_node.config execution_path.append(node_key) # Track @@ -106,7 +109,7 @@ async def execute_with_graph( graph_tracker.track_handoff_success(prev_node_key, node_key) # Get valid routes from outgoing edges - edges = current_node.get_edges() + edges = current_node.edges valid_routes = [] for edge in edges: handoff = edge.handoff or {} @@ -122,7 +125,15 @@ async def execute_with_graph( result = await agent.ainvoke(ctx) duration_ms = int((time.time() - node_start) * 1000) - self._track_duration(graph_tracker, graph_key, config, duration_ms) + self._track_duration(graph_tracker, node_key, config, duration_ms) + + # The node's success/error is emitted here rather than inside + # the agent, which no longer has a tracker. + if graph_tracker: + if result.get("_error"): + graph_tracker.track_node_error(node_key, config) + elif not result.get("_skipped"): + graph_tracker.track_node_success(node_key, config) # Track tool calls to LaunchDarkly if graph_tracker and result.get("tool_calls"): @@ -219,28 +230,16 @@ def _update_context(self, node_key: str, config, result: dict, ctx: dict): ctx["agent_configs"].append(agent_info) - def _track_duration(self, graph_tracker, graph_key: str, config, duration_ms: int): - """Track node duration.""" + def _track_duration(self, graph_tracker, node_key: str, config, duration_ms: int): + """Track node duration. + + Takes the NODE key. The previous version was handed the graph key and + recovered the node's config key from a private tracker attribute; the + caller has the node key directly. + """ if not graph_tracker or not config: return - if not hasattr(graph_tracker, '_ld_client'): - return - - tracker = config.tracker - track_data = { - 'graphKey': graph_key, - 'configKey': getattr(tracker, '_config_key', 'unknown'), - 'variationKey': getattr(tracker, '_variation_key', 'default'), - 'version': getattr(tracker, '_version', 1), - 'modelName': getattr(tracker, '_model_name', 'unknown'), - 'providerName': getattr(tracker, '_provider_name', 'unknown'), - } - graph_tracker._ld_client.track( - "$ld:ai:duration:total", - graph_tracker._context, - track_data, - duration_ms - ) + graph_tracker.track_node_duration(node_key, config, duration_ms) def _track_graph_metrics(self, graph_tracker, ctx: dict, path: list, start_time: float): """Track overall graph metrics.""" @@ -255,9 +254,7 @@ def _track_graph_metrics(self, graph_tracker, ctx: dict, path: list, start_time: total_in = ctx.get("total_input_tokens", 0) total_out = ctx.get("total_output_tokens", 0) if total_in > 0 or total_out > 0: - graph_tracker.track_total_tokens( - TokenUsage(input=total_in, output=total_out, total=total_in + total_out) - ) + graph_tracker.track_total_tokens(total_in + total_out) graph_tracker.track_invocation_success() diff --git a/config_manager.py b/config_manager.py index 311ed95..7fd77e1 100644 --- a/config_manager.py +++ b/config_manager.py @@ -5,10 +5,142 @@ import os import json from pathlib import Path +import asyncio import ldclient -from ldclient import Context -from ldai.client import LDAIClient, AIAgentConfigDefault, ModelConfig, ProviderConfig -from ldai.tracker import FeedbackKind +from launchdarkly_ai_server import ( + get_client, + init_client, + inspect_config, + parse_ai_config, + resolve_graph, +) + +# The AI SDK has no feedback API, so these are emitted directly. Keep the keys +# byte-identical to the ones the previous SDK sent or the existing feedback +# metrics stop receiving data. +FEEDBACK_EVENTS = { + True: "$ld:ai:feedback:user:positive", + False: "$ld:ai:feedback:user:negative", +} + + +class GraphTracker: + """Emits the graph events that the SDK used to emit for a hand-rolled walk. + + graph().invoke() records these itself, but this service traverses the graph + by hand through resolve_graph(), so nothing records them for it. The method + names match what agent_service already calls. + + The event keys are the CURRENT ones, which differ from the previous SDK: + + $ld:ai:graph:handoff -> handoff_success / handoff_failure + $ld:ai:graph:invocation -> invocation_success / invocation_failure + $ld:ai:graph:total -> total_tokens + $ld:ai:tool -> tool_call + $ld:ai:graph:path -> graph:node, one event per node entered + + Any LaunchDarkly metric keyed on the old names needs recreating against the + new ones. There is no replacement for the old graph:redirect event. + """ + + def __init__(self, graph_key: str, context: dict): + self._graph_key = graph_key + self._context = context + self._data = {"graphKey": graph_key} + self._nodes_entered = 0 + + def _track(self, event: str, value=1, extra: dict | None = None): + try: + data = {**self._data, **extra} if extra else self._data + get_client().track(event, self._context, data, value) + except Exception as e: + log_debug(f"GRAPH TRACK ERROR ({event}): {e}") + + def track_node_invocation(self, node_key: str): + """Record this node as it is entered. + + 0.2.4 added $ld:ai:graph:node for exactly this, and the ordered series + of these events is the path the walk took. Emitted on entry rather than + at the end so a node that then fails still leaves its step behind. + """ + log_debug(f"GRAPH: entering node {node_key}") + self._track( + "$ld:ai:graph:node", 1, {"nodeKey": node_key, "index": self._nodes_entered} + ) + self._nodes_entered += 1 + + def track_handoff_success(self, source_key: str, target_key: str): + self._track("$ld:ai:graph:handoff_success") + + def track_handoff_failure(self, source_key: str, routing): + self._track("$ld:ai:graph:handoff_failure") + + def track_tool_call(self, node_key: str, tool_name: str): + self._track("$ld:ai:tool_call") + + def track_invocation_success(self): + self._track("$ld:ai:graph:invocation_success") + + def track_invocation_failure(self): + self._track("$ld:ai:graph:invocation_failure") + + def track_node_success(self, node_key: str, config: dict): + self._track_generation("$ld:ai:generation:success", node_key, config, 1) + + def track_node_error(self, node_key: str, config: dict): + self._track_generation("$ld:ai:generation:error", node_key, config, 1) + + def _track_generation(self, event: str, node_key: str, config: dict, value): + model = (config or {}).get("model") or {} + data = { + "graphKey": self._graph_key, + "configKey": node_key, + "modelName": model.get("name", "unknown"), + "providerName": ((config or {}).get("provider") or {}).get("name", "unknown"), + } + try: + get_client().track(event, self._context, data, value) + except Exception as e: + log_debug(f"GRAPH TRACK ERROR ({event}): {e}") + + def track_latency(self, latency_ms: int): + self._track("$ld:ai:graph:duration:total", latency_ms) + + def track_node_duration(self, node_key: str, config: dict, duration_ms: int): + """Record one node's generation duration. + + The caller used to build this event by reaching into the tracker's + _ld_client and _context and reading five private attributes off the + node's config tracker. Configs are plain dicts now, so the model and + provider come from public keys instead. + """ + model = (config or {}).get("model") or {} + data = { + "graphKey": self._graph_key, + "configKey": node_key, + "modelName": model.get("name", "unknown"), + "providerName": ((config or {}).get("provider") or {}).get("name", "unknown"), + } + try: + get_client().track("$ld:ai:duration:total", self._context, data, duration_ms) + except Exception as e: + log_debug(f"GRAPH TRACK ERROR (duration): {e}") + + def track_total_tokens(self, total: int): + """Total tokens across the walk. + + Takes an int. The previous tracker took a TokenUsage object; this event + carries a single numeric value. + """ + self._track("$ld:ai:graph:total_tokens", total) + + def track_path(self, path): + """No-op. The path is the series of $ld:ai:graph:node events. + + Kept so the caller does not need to change; 0.2.4 retired the single + $ld:ai:graph:path event that this used to send. + """ + log_debug(f"GRAPH: path {' -> '.join(path)}") from dotenv import load_dotenv from utils.logger import log_student, log_debug import boto3 @@ -62,14 +194,14 @@ def _load_config_defaults(self): " python bootstrap/create_configs.py" ) - def _get_default_config(self, config_key: str) -> AIAgentConfigDefault: + def _get_default_config(self, config_key: str) -> dict: """Get fallback config from .ai_config_defaults.json Args: config_key: The AI config key (e.g., 'support-agent') Returns: - AIAgentConfigDefault object with config from the defaults file + A dict in the shape the SDK serves, validated by parse_ai_config Raises: ValueError: If config key not found in defaults @@ -85,22 +217,31 @@ def _get_default_config(self, config_key: str) -> AIAgentConfigDefault: config_data = self.config_defaults[config_key] - # Convert JSON config to AIAgentConfigDefault - # Note: Tools are managed by LaunchDarkly and not part of defaults - return AIAgentConfigDefault( - enabled=config_data.get("enabled", True), - model=ModelConfig( - name=config_data["model"]["name"], - parameters=config_data["model"].get("parameters", {}) - ), - provider=ProviderConfig( - name=config_data["provider"]["name"] - ), - instructions=config_data.get("instructions", "You are a helpful assistant.") - ) + # Configs are plain dicts now, so this shape is what the SDK serves + # rather than an AIAgentConfigDefault. Tools are managed by + # LaunchDarkly and not part of defaults. + candidate = { + "model": { + "name": config_data["model"]["name"], + "parameters": config_data["model"].get("parameters", {}), + }, + "provider": {"name": config_data["provider"]["name"]}, + "instructions": config_data.get("instructions", "You are a helpful assistant."), + } + + # Validated rather than trusted: a stale defaults file should fail + # loudly here instead of being served to a model. + result = parse_ai_config(candidate) + if not result.success: + raise ValueError( + f"Fallback config '{config_key}' in .ai_config_defaults.json is not valid: " + f"{result.error.get('message')}\n\nRegenerate it with:\n" + " python bootstrap/create_configs.py" + ) + return result.data def _initialize_launchdarkly_client(self): - """Initialize LaunchDarkly client and AI client""" + """Initialize LaunchDarkly client and hand it to the AI SDK""" config = ldclient.Config(self.sdk_key) ldclient.set_config(config) self.ld_client = ldclient.get() @@ -115,7 +256,8 @@ def _initialize_launchdarkly_client(self): if not self.ld_client.is_initialized(): raise RuntimeError("LaunchDarkly client initialization failed") - self.ai_client = LDAIClient(self.ld_client) + # There is no separate AI client to build. init_client is a coroutine, + # so this client is handed over on first use in _ensure_ai_client. def _initialize_bedrock_session(self): """Initialize AWS Bedrock session if AUTH_METHOD=sso""" @@ -160,21 +302,22 @@ def _initialize_bedrock_session(self): log_student(f"Run: aws sso login{profile_hint}") raise - def build_context(self, user_id: str, user_context: dict = None) -> Context: + def build_context(self, user_id: str, user_context: dict = None) -> dict: """Build a LaunchDarkly context with consistent attributes. This ensures the same context is used for AI Config evaluation and standard tracking. """ - context_builder = Context.builder(user_id).kind('user') - + # Contexts are plain dicts now; there is no builder. + context = {"kind": "user", "key": user_id} + if user_context: # Set all attributes from user_context for consistency for key, value in user_context.items(): - context_builder.set(key, value) + context[key] = value log_debug(f"CONFIG MANAGER: Set {key}={value}") - - return context_builder.build() + + return context async def get_config(self, user_id: str, config_key: str = None, user_context: dict = None): @@ -195,24 +338,50 @@ async def get_config(self, user_id: str, config_key: str = None, user_context: d ai_config_key = config_key or os.getenv('LAUNCHDARKLY_AI_CONFIG_KEY', 'support-agent') log_debug(f"CONFIG MANAGER: Using AI config key: {ai_config_key}") - # Load default from .ai_config_defaults.json (fails with helpful error if not found) - default_config = self._get_default_config(ai_config_key) - log_debug(f"CONFIG MANAGER: Loaded fallback default - model: {default_config.model.name}") - - # Call LaunchDarkly using new SDK pattern - agent_config(key, context, default) - result = self.ai_client.agent_config(ai_config_key, ld_user_context, default=default_config) - log_debug("CONFIG MANAGER: ✅ Got config (from LaunchDarkly or fallback)") + await self._ensure_ai_client() + + # There is no `default=` parameter on this SDK, so the fallback is + # applied here. inspect_config never raises and reports enabled=False + # on any failure, which keeps this to one branch. + inspected = await inspect_config(ai_config_key, ld_user_context) + + if inspected["enabled"] and inspected["config"]: + config = inspected["config"] + meta = inspected["meta"] or {} + log_debug("CONFIG MANAGER: ✅ Got config from LaunchDarkly") + log_debug(f"CONFIG MANAGER: Model: {(config.get('model') or {}).get('name', 'unknown')}") + # The variation key is public metadata now, not a private tracker + # attribute read behind a hasattr guard. + log_debug(f"CONFIG MANAGER: Variation: {meta.get('variationKey', 'unknown')}") + return config + + log_student(f"CONFIG MANAGER: '{ai_config_key}' not served, using .ai_config_defaults.json") + return self._get_default_config(ai_config_key) + + async def _ensure_ai_client(self): + """Hand the existing client to the AI SDK. Idempotent.""" + # client= is keyword-only in effect: a positional argument is read as + # the options dict, not as a client. + await init_client(client=self.ld_client) + + async def get_agent_graph(self, user_id: str, graph_key: str, user_context: dict = None): + """Resolve an agent graph and a tracker for a hand-rolled traversal. + + This method did not exist: agent_service called it but nothing defined + it, so the graph path raised AttributeError before any of this ran. It + is written here against resolve_graph(), which the SDK documents as the + path "for framework-native runners" -- i.e. callers that walk the graph + themselves, which is what agent_service does. + + resolve_graph returns topology only and records nothing, so the tracker + is ours. Returns (graph, tracker); the graph exposes `enabled`, `root`, + `edges_from`, and `reverse_traverse` as attributes. + """ + await self._ensure_ai_client() + ld_user_context = self.build_context(user_id, user_context) - # Debug the actual configuration received (basic info only) - try: - config_dict = result.to_dict() - log_debug(f"CONFIG MANAGER: Model: {config_dict.get('model', {}).get('name', 'unknown')}") - if hasattr(result, 'tracker') and hasattr(result.tracker, '_variation_key'): - log_debug(f"CONFIG MANAGER: Variation: {result.tracker._variation_key}") - except Exception as debug_e: - log_debug(f"CONFIG MANAGER: Could not debug result: {debug_e}") - - return result + graph = await resolve_graph(graph_key, context=ld_user_context) + return graph, GraphTracker(graph_key, ld_user_context) def flush(self): @@ -223,39 +392,15 @@ def clear_cache(self): """Clear any cached configs (no-op for now, configs fetched live)""" pass - def get_agent_graph(self, user_id: str, graph_key: str, user_context: dict = None): - """Get LaunchDarkly Agent Graph definition. - - Args: - user_id: User identifier for targeting - graph_key: The agent graph key (e.g., 'chatbot-flow') - user_context: Optional user attributes for targeting + def track_feedback(self, context, thumbs_up: bool): + """Track user feedback with LaunchDarkly. - Returns: - AgentGraphDefinition from LaunchDarkly + There is no tracker and no feedback API, so this emits the legacy event + directly. `context` replaces the tracker argument, because the event + has to land on the same context the config was evaluated with. """ - log_debug(f"CONFIG MANAGER: Getting agent graph '{graph_key}' for user_id={user_id}") - - # Build context using centralized method - ld_context = self.build_context(user_id, user_context) - - # Get agent graph from LaunchDarkly - graph = self.ai_client.agent_graph(graph_key, ld_context) - log_debug(f"CONFIG MANAGER: Got agent graph '{graph_key}'") - - return graph - - def track_feedback(self, tracker, thumbs_up: bool): - """Track user feedback with LaunchDarkly""" - if not tracker: - return False - try: - # Use LaunchDarkly's feedback tracking - feedback_dict = { - "kind": FeedbackKind.Positive if thumbs_up else FeedbackKind.Negative - } - tracker.track_feedback(feedback_dict) + self.ld_client.track(FEEDBACK_EVENTS[bool(thumbs_up)], context, None, 1) log_student(f"FEEDBACK TRACKED: {'👍 Positive' if thumbs_up else '👎 Negative'}") self.ld_client.flush() return True diff --git a/pyproject.toml b/pyproject.toml index c8df1ee..17c50b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "agents-demo" version = "0.1.0" description = "LaunchDarkly AI Configs tutorial with LangGraph agents" -requires-python = ">=3.11" +requires-python = ">=3.12" dependencies = [ # Agent Framework "langchain>=0.1.0", @@ -12,9 +12,9 @@ dependencies = [ "fastapi>=0.115.0", "uvicorn[standard]>=0.32.0", "pydantic>=2.10.0", - # LaunchDarkly (using currently available versions; update to >=10.0.0 / >=1.0.0 at GA) + # LaunchDarkly. The AI SDK is in open beta, so it is pinned exactly. "launchdarkly-server-sdk>=9.0.0", - "launchdarkly-server-sdk-ai>=0.10.0", + "launchdarkly-ai-server==0.2.4", # AWS Bedrock Integration "langchain-aws>=0.2.0", "boto3>=1.35.0", @@ -50,5 +50,3 @@ dev = [ [tool.setuptools] packages = ["api", "agents"] -[tool.uv.sources] -launchdarkly-server-sdk-ai = { git = "https://github.com/launchdarkly/python-server-sdk-ai", subdirectory = "packages/sdk/server-ai", rev = "main" } diff --git a/uv.lock b/uv.lock index 28ac2db..1341d21 100644 --- a/uv.lock +++ b/uv.lock @@ -1,10 +1,6 @@ version = 1 revision = 3 -requires-python = ">=3.11" -resolution-markers = [ - "python_full_version >= '3.12'", - "python_full_version < '3.12'", -] +requires-python = ">=3.12" [[package]] name = "agents-demo" @@ -21,8 +17,8 @@ dependencies = [ { name = "langchain-mistralai" }, { name = "langchain-openai" }, { name = "langgraph" }, + { name = "launchdarkly-ai-server" }, { name = "launchdarkly-server-sdk" }, - { name = "launchdarkly-server-sdk-ai" }, { name = "numpy" }, { name = "openai" }, { name = "pydantic" }, @@ -55,8 +51,8 @@ requires-dist = [ { name = "langchain-mistralai", specifier = ">=0.2.12" }, { name = "langchain-openai", specifier = ">=0.3.31" }, { name = "langgraph", specifier = ">=0.0.40" }, + { name = "launchdarkly-ai-server", specifier = "==0.2.4" }, { name = "launchdarkly-server-sdk", specifier = ">=9.0.0" }, - { name = "launchdarkly-server-sdk-ai", git = "https://github.com/launchdarkly/python-server-sdk-ai?subdirectory=packages%2Fsdk%2Fserver-ai&rev=main" }, { name = "numpy", specifier = ">=1.24.0" }, { name = "openai", specifier = ">=1.0.0" }, { name = "pydantic", specifier = ">=2.10.0" }, @@ -226,22 +222,6 @@ version = "3.4.5" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/1d/35/02daf95b9cd686320bb622eb148792655c9412dbb9b67abb5694e5910a24/charset_normalizer-3.4.5.tar.gz", hash = "sha256:95adae7b6c42a6c5b5b559b1a99149f090a57128155daeea91732c8d970d8644", size = 134804, upload-time = "2026-03-06T06:03:19.46Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/8f/9e/bcec3b22c64ecec47d39bf5167c2613efd41898c019dccd4183f6aa5d6a7/charset_normalizer-3.4.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:610f72c0ee565dfb8ae1241b666119582fdbfe7c0975c175be719f940e110694", size = 279531, upload-time = "2026-03-06T06:00:52.252Z" }, - { url = "https://files.pythonhosted.org/packages/58/12/81fd25f7e7078ab5d1eedbb0fac44be4904ae3370a3bf4533c8f2d159acd/charset_normalizer-3.4.5-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:60d68e820af339df4ae8358c7a2e7596badeb61e544438e489035f9fbf3246a5", size = 188006, upload-time = "2026-03-06T06:00:53.8Z" }, - { url = "https://files.pythonhosted.org/packages/ae/6e/f2d30e8c27c1b0736a6520311982cf5286cfc7f6cac77d7bc1325e3a23f2/charset_normalizer-3.4.5-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:10b473fc8dca1c3ad8559985794815f06ca3fc71942c969129070f2c3cdf7281", size = 205085, upload-time = "2026-03-06T06:00:55.311Z" }, - { url = "https://files.pythonhosted.org/packages/d0/90/d12cefcb53b5931e2cf792a33718d7126efb116a320eaa0742c7059a95e4/charset_normalizer-3.4.5-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d4eb8ac7469b2a5d64b5b8c04f84d8bf3ad340f4514b98523805cbf46e3b3923", size = 200545, upload-time = "2026-03-06T06:00:56.532Z" }, - { url = "https://files.pythonhosted.org/packages/03/f4/44d3b830a20e89ff82a3134912d9a1cf6084d64f3b95dcad40f74449a654/charset_normalizer-3.4.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5bcb3227c3d9aaf73eaaab1db7ccd80a8995c509ee9941e2aae060ca6e4e5d81", size = 193863, upload-time = "2026-03-06T06:00:57.823Z" }, - { url = "https://files.pythonhosted.org/packages/25/4b/f212119c18a6320a9d4a730d1b4057875cdeabf21b3614f76549042ef8a8/charset_normalizer-3.4.5-cp311-cp311-manylinux_2_31_armv7l.whl", hash = "sha256:75ee9c1cce2911581a70a3c0919d8bccf5b1cbc9b0e5171400ec736b4b569497", size = 181827, upload-time = "2026-03-06T06:00:59.323Z" }, - { url = "https://files.pythonhosted.org/packages/74/00/b26158e48b425a202a92965f8069e8a63d9af1481dfa206825d7f74d2a3c/charset_normalizer-3.4.5-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:1d1401945cb77787dbd3af2446ff2d75912327c4c3a1526ab7955ecf8600687c", size = 191085, upload-time = "2026-03-06T06:01:00.546Z" }, - { url = "https://files.pythonhosted.org/packages/c4/c2/1c1737bf6fd40335fe53d28fe49afd99ee4143cc57a845e99635ce0b9b6d/charset_normalizer-3.4.5-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0a45e504f5e1be0bd385935a8e1507c442349ca36f511a47057a71c9d1d6ea9e", size = 190688, upload-time = "2026-03-06T06:01:02.479Z" }, - { url = "https://files.pythonhosted.org/packages/5a/3d/abb5c22dc2ef493cd56522f811246a63c5427c08f3e3e50ab663de27fcf4/charset_normalizer-3.4.5-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:e09f671a54ce70b79a1fc1dc6da3072b7ef7251fadb894ed92d9aa8218465a5f", size = 183077, upload-time = "2026-03-06T06:01:04.231Z" }, - { url = "https://files.pythonhosted.org/packages/44/33/5298ad4d419a58e25b3508e87f2758d1442ff00c2471f8e0403dab8edad5/charset_normalizer-3.4.5-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:d01de5e768328646e6a3fa9e562706f8f6641708c115c62588aef2b941a4f88e", size = 206706, upload-time = "2026-03-06T06:01:05.773Z" }, - { url = "https://files.pythonhosted.org/packages/7b/17/51e7895ac0f87c3b91d276a449ef09f5532a7529818f59646d7a55089432/charset_normalizer-3.4.5-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:131716d6786ad5e3dc542f5cc6f397ba3339dc0fb87f87ac30e550e8987756af", size = 191665, upload-time = "2026-03-06T06:01:07.473Z" }, - { url = "https://files.pythonhosted.org/packages/90/8f/cce9adf1883e98906dbae380d769b4852bb0fa0004bc7d7a2243418d3ea8/charset_normalizer-3.4.5-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:1a374cc0b88aa710e8865dc1bd6edb3743c59f27830f0293ab101e4cf3ce9f85", size = 201950, upload-time = "2026-03-06T06:01:08.973Z" }, - { url = "https://files.pythonhosted.org/packages/08/ca/bce99cd5c397a52919e2769d126723f27a4c037130374c051c00470bcd38/charset_normalizer-3.4.5-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d31f0d1671e1534e395f9eb84a68e0fb670e1edb1fe819a9d7f564ae3bc4e53f", size = 195830, upload-time = "2026-03-06T06:01:10.155Z" }, - { url = "https://files.pythonhosted.org/packages/87/4f/2e3d023a06911f1281f97b8f036edc9872167036ca6f55cc874a0be6c12c/charset_normalizer-3.4.5-cp311-cp311-win32.whl", hash = "sha256:cace89841c0599d736d3d74a27bc5821288bb47c5441923277afc6059d7fbcb4", size = 132029, upload-time = "2026-03-06T06:01:11.706Z" }, - { url = "https://files.pythonhosted.org/packages/fe/1f/a853b73d386521fd44b7f67ded6b17b7b2367067d9106a5c4b44f9a34274/charset_normalizer-3.4.5-cp311-cp311-win_amd64.whl", hash = "sha256:f8102ae93c0bc863b1d41ea0f4499c20a83229f52ed870850892df555187154a", size = 142404, upload-time = "2026-03-06T06:01:12.865Z" }, - { url = "https://files.pythonhosted.org/packages/b4/10/dba36f76b71c38e9d391abe0fd8a5b818790e053c431adecfc98c35cd2a9/charset_normalizer-3.4.5-cp311-cp311-win_arm64.whl", hash = "sha256:ed98364e1c262cf5f9363c3eca8c2df37024f52a8fa1180a3610014f26eac51c", size = 132796, upload-time = "2026-03-06T06:01:14.106Z" }, { url = "https://files.pythonhosted.org/packages/9c/b6/9ee9c1a608916ca5feae81a344dffbaa53b26b90be58cc2159e3332d44ec/charset_normalizer-3.4.5-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:ed97c282ee4f994ef814042423a529df9497e3c666dca19be1d4cd1129dc7ade", size = 280976, upload-time = "2026-03-06T06:01:15.276Z" }, { url = "https://files.pythonhosted.org/packages/f8/d8/a54f7c0b96f1df3563e9190f04daf981e365a9b397eedfdfb5dbef7e5c6c/charset_normalizer-3.4.5-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0294916d6ccf2d069727d65973c3a1ca477d68708db25fd758dd28b0827cff54", size = 189356, upload-time = "2026-03-06T06:01:16.511Z" }, { url = "https://files.pythonhosted.org/packages/42/69/2bf7f76ce1446759a5787cb87d38f6a61eb47dbbdf035cfebf6347292a65/charset_normalizer-3.4.5-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:dc57a0baa3eeedd99fafaef7511b5a6ef4581494e8168ee086031744e2679467", size = 206369, upload-time = "2026-03-06T06:01:17.853Z" }, @@ -293,15 +273,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/c5/60/3a621758945513adfd4db86827a5bafcc615f913dbd0b4c2ed64a65731be/charset_normalizer-3.4.5-py3-none-any.whl", hash = "sha256:9db5e3fcdcee89a78c04dffb3fe33c79f77bd741a624946db2591c81b2fc85b0", size = 55455, upload-time = "2026-03-06T06:03:17.827Z" }, ] -[[package]] -name = "chevron" -version = "0.14.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/15/1f/ca74b65b19798895d63a6e92874162f44233467c9e7c1ed8afd19016ebe9/chevron-0.14.0.tar.gz", hash = "sha256:87613aafdf6d77b6a90ff073165a61ae5086e21ad49057aa0e53681601800ebf", size = 11440, upload-time = "2021-01-02T22:47:59.233Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/52/93/342cc62a70ab727e093ed98e02a725d85b746345f05d2b5e5034649f4ec8/chevron-0.14.0-py3-none-any.whl", hash = "sha256:fbf996a709f8da2e745ef763f482ce2d311aa817d287593a5b990d6d6e4f0443", size = 11595, upload-time = "2021-01-02T22:47:57.847Z" }, -] - [[package]] name = "click" version = "8.3.1" @@ -365,8 +336,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/e7/e1/a5acac02aa593809f0123539afe7b4aff61d1db149e7093239888c9053e1/faiss_cpu-1.13.2-cp310-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ab88ee287c25a119213153d033f7dd64c3ccec466ace267395872f554b648cd7", size = 23845772, upload-time = "2025-12-24T10:27:08.194Z" }, { url = "https://files.pythonhosted.org/packages/9c/7b/49dcaf354834ec457e85ca769d50bc9b5f3003fab7c94a9dcf08cf742793/faiss_cpu-1.13.2-cp310-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:85511129b34f890d19c98b82a0cd5ffb27d89d1cec2ee41d2621ee9f9ef8cf3f", size = 13477567, upload-time = "2025-12-24T10:27:10.822Z" }, { url = "https://files.pythonhosted.org/packages/f7/6b/12bb4037921c38bb2c0b4cfc213ca7e04bbbebbfea89b0b5746248ce446e/faiss_cpu-1.13.2-cp310-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:8b32eb4065bac352b52a9f5ae07223567fab0a976c7d05017c01c45a1c24264f", size = 25102239, upload-time = "2025-12-24T10:27:13.476Z" }, - { url = "https://files.pythonhosted.org/packages/14/6d/40439a05e4e60a0e889aa68b08ec70f5c8e32901f75f2be25c593a2e050e/faiss_cpu-1.13.2-cp311-cp311-win_amd64.whl", hash = "sha256:7c5944d7807d58fe7244b6aba06be710ee7ed99343365ed92699349efe979f51", size = 18879906, upload-time = "2025-12-24T10:27:19.041Z" }, - { url = "https://files.pythonhosted.org/packages/9f/f9/b97eadbdd9e00f945d1566c7101382344f504596bfb19219465b0fc61e6e/faiss_cpu-1.13.2-cp311-cp311-win_arm64.whl", hash = "sha256:19508a1badfb36e456c1c8664eeb948349f604db5c7545f277a0126b4a84b080", size = 8548280, upload-time = "2025-12-24T10:27:22.114Z" }, { url = "https://files.pythonhosted.org/packages/87/ff/35ed875423200c17bdd594ce921abfc1812ddd21e09355290b9a94e170ab/faiss_cpu-1.13.2-cp312-cp312-win_amd64.whl", hash = "sha256:b82c01d30430dd7b1fa442001b9099735d1a82f6bb72033acdc9206d5ac66a64", size = 18890300, upload-time = "2025-12-24T10:27:24.194Z" }, { url = "https://files.pythonhosted.org/packages/c5/3a/bbdf5deaf6feb34b46b469c0a0acd40216c3d3c6ecf5aeb71d56b8a650e3/faiss_cpu-1.13.2-cp312-cp312-win_arm64.whl", hash = "sha256:2c4f696ae76e7c97cbc12311db83aaf1e7f4f7be06a3ffea7e5b0e8ec1fd805b", size = 8553157, upload-time = "2025-12-24T10:27:26.38Z" }, { url = "https://files.pythonhosted.org/packages/60/4b/903d85bf3a8264d49964ec799e45c7ffc91098606b8bc9ef2c904c1a56cb/faiss_cpu-1.13.2-cp313-cp313-win_amd64.whl", hash = "sha256:cb4b5ee184816a4b099162ac93c0d7f0033d81a88e7c1291d0a9cc41ec348984", size = 18891330, upload-time = "2025-12-24T10:27:28.806Z" }, @@ -493,13 +462,6 @@ version = "0.7.1" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/b5/46/120a669232c7bdedb9d52d4aeae7e6c7dfe151e99dc70802e2fc7a5e1993/httptools-0.7.1.tar.gz", hash = "sha256:abd72556974f8e7c74a259655924a717a2365b236c882c3f6f8a45fe94703ac9", size = 258961, upload-time = "2025-10-10T03:55:08.559Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/9c/08/17e07e8d89ab8f343c134616d72eebfe03798835058e2ab579dcc8353c06/httptools-0.7.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:474d3b7ab469fefcca3697a10d11a32ee2b9573250206ba1e50d5980910da657", size = 206521, upload-time = "2025-10-10T03:54:31.002Z" }, - { url = "https://files.pythonhosted.org/packages/aa/06/c9c1b41ff52f16aee526fd10fbda99fa4787938aa776858ddc4a1ea825ec/httptools-0.7.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a3c3b7366bb6c7b96bd72d0dbe7f7d5eead261361f013be5f6d9590465ea1c70", size = 110375, upload-time = "2025-10-10T03:54:31.941Z" }, - { url = "https://files.pythonhosted.org/packages/cc/cc/10935db22fda0ee34c76f047590ca0a8bd9de531406a3ccb10a90e12ea21/httptools-0.7.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:379b479408b8747f47f3b253326183d7c009a3936518cdb70db58cffd369d9df", size = 456621, upload-time = "2025-10-10T03:54:33.176Z" }, - { url = "https://files.pythonhosted.org/packages/0e/84/875382b10d271b0c11aa5d414b44f92f8dd53e9b658aec338a79164fa548/httptools-0.7.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:cad6b591a682dcc6cf1397c3900527f9affef1e55a06c4547264796bbd17cf5e", size = 454954, upload-time = "2025-10-10T03:54:34.226Z" }, - { url = "https://files.pythonhosted.org/packages/30/e1/44f89b280f7e46c0b1b2ccee5737d46b3bb13136383958f20b580a821ca0/httptools-0.7.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:eb844698d11433d2139bbeeb56499102143beb582bd6c194e3ba69c22f25c274", size = 440175, upload-time = "2025-10-10T03:54:35.942Z" }, - { url = "https://files.pythonhosted.org/packages/6f/7e/b9287763159e700e335028bc1824359dc736fa9b829dacedace91a39b37e/httptools-0.7.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f65744d7a8bdb4bda5e1fa23e4ba16832860606fcc09d674d56e425e991539ec", size = 440310, upload-time = "2025-10-10T03:54:37.1Z" }, - { url = "https://files.pythonhosted.org/packages/b3/07/5b614f592868e07f5c94b1f301b5e14a21df4e8076215a3bccb830a687d8/httptools-0.7.1-cp311-cp311-win_amd64.whl", hash = "sha256:135fbe974b3718eada677229312e97f3b31f8a9c8ffa3ae6f565bf808d5b6bcb", size = 86875, upload-time = "2025-10-10T03:54:38.421Z" }, { url = "https://files.pythonhosted.org/packages/53/7f/403e5d787dc4942316e515e949b0c8a013d84078a915910e9f391ba9b3ed/httptools-0.7.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:38e0c83a2ea9746ebbd643bdfb521b9aa4a91703e2cd705c20443405d2fd16a5", size = 206280, upload-time = "2025-10-10T03:54:39.274Z" }, { url = "https://files.pythonhosted.org/packages/2a/0d/7f3fd28e2ce311ccc998c388dd1c53b18120fda3b70ebb022b135dc9839b/httptools-0.7.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f25bbaf1235e27704f1a7b86cd3304eabc04f569c828101d94a0e605ef7205a5", size = 110004, upload-time = "2025-10-10T03:54:40.403Z" }, { url = "https://files.pythonhosted.org/packages/84/a6/b3965e1e146ef5762870bbe76117876ceba51a201e18cc31f5703e454596/httptools-0.7.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:2c15f37ef679ab9ecc06bfc4e6e8628c32a8e4b305459de7cf6785acd57e4d03", size = 517655, upload-time = "2025-10-10T03:54:41.347Z" }, @@ -603,19 +565,6 @@ version = "0.13.0" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/0d/5e/4ec91646aee381d01cdb9974e30882c9cd3b8c5d1079d6b5ff4af522439a/jiter-0.13.0.tar.gz", hash = "sha256:f2839f9c2c7e2dffc1bc5929a510e14ce0a946be9365fd1219e7ef342dae14f4", size = 164847, upload-time = "2026-02-02T12:37:56.441Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/71/29/499f8c9eaa8a16751b1c0e45e6f5f1761d180da873d417996cc7bddc8eef/jiter-0.13.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:ea026e70a9a28ebbdddcbcf0f1323128a8db66898a06eaad3a4e62d2f554d096", size = 311157, upload-time = "2026-02-02T12:35:37.758Z" }, - { url = "https://files.pythonhosted.org/packages/50/f6/566364c777d2ab450b92100bea11333c64c38d32caf8dc378b48e5b20c46/jiter-0.13.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:66aa3e663840152d18cc8ff1e4faad3dd181373491b9cfdc6004b92198d67911", size = 319729, upload-time = "2026-02-02T12:35:39.246Z" }, - { url = "https://files.pythonhosted.org/packages/73/dd/560f13ec5e4f116d8ad2658781646cca91b617ae3b8758d4a5076b278f70/jiter-0.13.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c3524798e70655ff19aec58c7d05adb1f074fecff62da857ea9be2b908b6d701", size = 354766, upload-time = "2026-02-02T12:35:40.662Z" }, - { url = "https://files.pythonhosted.org/packages/7c/0d/061faffcfe94608cbc28a0d42a77a74222bdf5055ccdbe5fd2292b94f510/jiter-0.13.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ec7e287d7fbd02cb6e22f9a00dd9c9cd504c40a61f2c61e7e1f9690a82726b4c", size = 362587, upload-time = "2026-02-02T12:35:42.025Z" }, - { url = "https://files.pythonhosted.org/packages/92/c9/c66a7864982fd38a9773ec6e932e0398d1262677b8c60faecd02ffb67bf3/jiter-0.13.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:47455245307e4debf2ce6c6e65a717550a0244231240dcf3b8f7d64e4c2f22f4", size = 487537, upload-time = "2026-02-02T12:35:43.459Z" }, - { url = "https://files.pythonhosted.org/packages/6c/86/84eb4352cd3668f16d1a88929b5888a3fe0418ea8c1dfc2ad4e7bf6e069a/jiter-0.13.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ee9da221dca6e0429c2704c1b3655fe7b025204a71d4d9b73390c759d776d165", size = 373717, upload-time = "2026-02-02T12:35:44.928Z" }, - { url = "https://files.pythonhosted.org/packages/6e/09/9fe4c159358176f82d4390407a03f506a8659ed13ca3ac93a843402acecf/jiter-0.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:24ab43126d5e05f3d53a36a8e11eb2f23304c6c1117844aaaf9a0aa5e40b5018", size = 362683, upload-time = "2026-02-02T12:35:46.636Z" }, - { url = "https://files.pythonhosted.org/packages/c9/5e/85f3ab9caca0c1d0897937d378b4a515cae9e119730563572361ea0c48ae/jiter-0.13.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9da38b4fedde4fb528c740c2564628fbab737166a0e73d6d46cb4bb5463ff411", size = 392345, upload-time = "2026-02-02T12:35:48.088Z" }, - { url = "https://files.pythonhosted.org/packages/12/4c/05b8629ad546191939e6f0c2f17e29f542a398f4a52fb987bc70b6d1eb8b/jiter-0.13.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:0b34c519e17658ed88d5047999a93547f8889f3c1824120c26ad6be5f27b6cf5", size = 517775, upload-time = "2026-02-02T12:35:49.482Z" }, - { url = "https://files.pythonhosted.org/packages/4d/88/367ea2eb6bc582c7052e4baf5ddf57ebe5ab924a88e0e09830dfb585c02d/jiter-0.13.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d2a6394e6af690d462310a86b53c47ad75ac8c21dc79f120714ea449979cb1d3", size = 551325, upload-time = "2026-02-02T12:35:51.104Z" }, - { url = "https://files.pythonhosted.org/packages/f3/12/fa377ffb94a2f28c41afaed093e0d70cfe512035d5ecb0cad0ae4792d35e/jiter-0.13.0-cp311-cp311-win32.whl", hash = "sha256:0f0c065695f616a27c920a56ad0d4fc46415ef8b806bf8fc1cacf25002bd24e1", size = 204709, upload-time = "2026-02-02T12:35:52.467Z" }, - { url = "https://files.pythonhosted.org/packages/cb/16/8e8203ce92f844dfcd3d9d6a5a7322c77077248dbb12da52d23193a839cd/jiter-0.13.0-cp311-cp311-win_amd64.whl", hash = "sha256:0733312953b909688ae3c2d58d043aa040f9f1a6a75693defed7bc2cc4bf2654", size = 204560, upload-time = "2026-02-02T12:35:53.925Z" }, - { url = "https://files.pythonhosted.org/packages/44/26/97cc40663deb17b9e13c3a5cf29251788c271b18ee4d262c8f94798b8336/jiter-0.13.0-cp311-cp311-win_arm64.whl", hash = "sha256:5d9b34ad56761b3bf0fbe8f7e55468704107608512350962d3317ffd7a4382d5", size = 189608, upload-time = "2026-02-02T12:35:55.304Z" }, { url = "https://files.pythonhosted.org/packages/2e/30/7687e4f87086829955013ca12a9233523349767f69653ebc27036313def9/jiter-0.13.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:0a2bd69fc1d902e89925fc34d1da51b2128019423d7b339a45d9e99c894e0663", size = 307958, upload-time = "2026-02-02T12:35:57.165Z" }, { url = "https://files.pythonhosted.org/packages/c3/27/e57f9a783246ed95481e6749cc5002a8a767a73177a83c63ea71f0528b90/jiter-0.13.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f917a04240ef31898182f76a332f508f2cc4b57d2b4d7ad2dbfebbfe167eb505", size = 318597, upload-time = "2026-02-02T12:35:58.591Z" }, { url = "https://files.pythonhosted.org/packages/cf/52/e5719a60ac5d4d7c5995461a94ad5ef962a37c8bf5b088390e6fad59b2ff/jiter-0.13.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c1e2b199f446d3e82246b4fd9236d7cb502dc2222b18698ba0d986d2fecc6152", size = 348821, upload-time = "2026-02-02T12:36:00.093Z" }, @@ -672,10 +621,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/47/66/eea81dfff765ed66c68fd2ed8c96245109e13c896c2a5015c7839c92367e/jiter-0.13.0-cp314-cp314t-win32.whl", hash = "sha256:24dc96eca9f84da4131cdf87a95e6ce36765c3b156fc9ae33280873b1c32d5f6", size = 201196, upload-time = "2026-02-02T12:37:19.101Z" }, { url = "https://files.pythonhosted.org/packages/ff/32/4ac9c7a76402f8f00d00842a7f6b83b284d0cf7c1e9d4227bc95aa6d17fa/jiter-0.13.0-cp314-cp314t-win_amd64.whl", hash = "sha256:0a8d76c7524087272c8ae913f5d9d608bd839154b62c4322ef65723d2e5bb0b8", size = 204215, upload-time = "2026-02-02T12:37:20.495Z" }, { url = "https://files.pythonhosted.org/packages/f9/8e/7def204fea9f9be8b3c21a6f2dd6c020cf56c7d5ff753e0e23ed7f9ea57e/jiter-0.13.0-cp314-cp314t-win_arm64.whl", hash = "sha256:2c26cf47e2cad140fa23b6d58d435a7c0161f5c514284802f25e87fddfe11024", size = 187152, upload-time = "2026-02-02T12:37:22.124Z" }, - { url = "https://files.pythonhosted.org/packages/79/b3/3c29819a27178d0e461a8571fb63c6ae38be6dc36b78b3ec2876bbd6a910/jiter-0.13.0-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:b1cbfa133241d0e6bdab48dcdc2604e8ba81512f6bbd68ec3e8e1357dd3c316c", size = 307016, upload-time = "2026-02-02T12:37:42.755Z" }, - { url = "https://files.pythonhosted.org/packages/eb/ae/60993e4b07b1ac5ebe46da7aa99fdbb802eb986c38d26e3883ac0125c4e0/jiter-0.13.0-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:db367d8be9fad6e8ebbac4a7578b7af562e506211036cba2c06c3b998603c3d2", size = 305024, upload-time = "2026-02-02T12:37:44.774Z" }, - { url = "https://files.pythonhosted.org/packages/77/fa/2227e590e9cf98803db2811f172b2d6460a21539ab73006f251c66f44b14/jiter-0.13.0-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:45f6f8efb2f3b0603092401dc2df79fa89ccbc027aaba4174d2d4133ed661434", size = 339337, upload-time = "2026-02-02T12:37:46.668Z" }, - { url = "https://files.pythonhosted.org/packages/2d/92/015173281f7eb96c0ef580c997da8ef50870d4f7f4c9e03c845a1d62ae04/jiter-0.13.0-graalpy311-graalpy242_311_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:597245258e6ad085d064780abfb23a284d418d3e61c57362d9449c6c7317ee2d", size = 346395, upload-time = "2026-02-02T12:37:48.09Z" }, { url = "https://files.pythonhosted.org/packages/80/60/e50fa45dd7e2eae049f0ce964663849e897300433921198aef94b6ffa23a/jiter-0.13.0-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:3d744a6061afba08dd7ae375dcde870cffb14429b7477e10f67e9e6d68772a0a", size = 305169, upload-time = "2026-02-02T12:37:50.376Z" }, { url = "https://files.pythonhosted.org/packages/d2/73/a009f41c5eed71c49bec53036c4b33555afcdee70682a18c6f66e396c039/jiter-0.13.0-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:ff732bd0a0e778f43d5009840f20b935e79087b4dc65bd36f1cd0f9b04b8ff7f", size = 303808, upload-time = "2026-02-02T12:37:52.092Z" }, { url = "https://files.pythonhosted.org/packages/c4/10/528b439290763bff3d939268085d03382471b442f212dca4ff5f12802d43/jiter-0.13.0-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ab44b178f7981fcaea7e0a5df20e773c663d06ffda0198f1a524e91b2fde7e59", size = 337384, upload-time = "2026-02-02T12:37:53.582Z" }, @@ -907,6 +852,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/34/31/62689d57f4d25792bd6a3c05c868771899481be2f3e31f9e71d31e1ac4ab/langsmith-0.7.17-py3-none-any.whl", hash = "sha256:cbec10460cb6c6ecc94c18c807be88a9984838144ae6c4693c9f859f378d7d02", size = 359147, upload-time = "2026-03-12T20:41:08.758Z" }, ] +[[package]] +name = "launchdarkly-ai-server" +version = "0.2.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "opentelemetry-api" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/77/ba/ae8af286682bb054e6e35af6ea0459832246e61e7ceb1578748518260b0d/launchdarkly_ai_server-0.2.4.tar.gz", hash = "sha256:8f20ff80811c530a98f54e2e1fa8e3f24d3b599ceae45b023bae72c8b517f80e", size = 161860, upload-time = "2026-09-30T23:30:42.274Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f3/0a/dbe2090ab16bb2aeba7c27d86c9ae11d922ba852d6a91392db2cb556931c/launchdarkly_ai_server-0.2.4-py3-none-any.whl", hash = "sha256:d504671564c28eaca3e72ed3b74c00f1f461b730265af56e2d6b9d321177398c", size = 98988, upload-time = "2026-09-30T23:30:41.094Z" }, +] + [[package]] name = "launchdarkly-eventsource" version = "1.5.1" @@ -936,15 +893,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/79/0e/fb5954448bcdef93475d14d2500edd9730c6d7dc02a3bb9732c602ac2981/launchdarkly_server_sdk-9.15.0-py3-none-any.whl", hash = "sha256:c267e29bfa3fb5e2a06a208448ada6ed5557a2924979b8d79c970b45d227c668", size = 293564, upload-time = "2026-02-10T17:35:58.824Z" }, ] -[[package]] -name = "launchdarkly-server-sdk-ai" -version = "0.16.0" -source = { git = "https://github.com/launchdarkly/python-server-sdk-ai?subdirectory=packages%2Fsdk%2Fserver-ai&rev=main#a14761d0f832e2fd07323f1f5322c76a1d7d7bf6" } -dependencies = [ - { name = "chevron" }, - { name = "launchdarkly-server-sdk" }, -] - [[package]] name = "markdown-it-py" version = "4.0.0" @@ -963,17 +911,6 @@ version = "3.0.3" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz", hash = "sha256:722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698", size = 80313, upload-time = "2025-09-27T18:37:40.426Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/08/db/fefacb2136439fc8dd20e797950e749aa1f4997ed584c62cfb8ef7c2be0e/markupsafe-3.0.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1cc7ea17a6824959616c525620e387f6dd30fec8cb44f649e31712db02123dad", size = 11631, upload-time = "2025-09-27T18:36:18.185Z" }, - { url = "https://files.pythonhosted.org/packages/e1/2e/5898933336b61975ce9dc04decbc0a7f2fee78c30353c5efba7f2d6ff27a/markupsafe-3.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4bd4cd07944443f5a265608cc6aab442e4f74dff8088b0dfc8238647b8f6ae9a", size = 12058, upload-time = "2025-09-27T18:36:19.444Z" }, - { url = "https://files.pythonhosted.org/packages/1d/09/adf2df3699d87d1d8184038df46a9c80d78c0148492323f4693df54e17bb/markupsafe-3.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b5420a1d9450023228968e7e6a9ce57f65d148ab56d2313fcd589eee96a7a50", size = 24287, upload-time = "2025-09-27T18:36:20.768Z" }, - { url = "https://files.pythonhosted.org/packages/30/ac/0273f6fcb5f42e314c6d8cd99effae6a5354604d461b8d392b5ec9530a54/markupsafe-3.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0bf2a864d67e76e5c9a34dc26ec616a66b9888e25e7b9460e1c76d3293bd9dbf", size = 22940, upload-time = "2025-09-27T18:36:22.249Z" }, - { url = "https://files.pythonhosted.org/packages/19/ae/31c1be199ef767124c042c6c3e904da327a2f7f0cd63a0337e1eca2967a8/markupsafe-3.0.3-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc51efed119bc9cfdf792cdeaa4d67e8f6fcccab66ed4bfdd6bde3e59bfcbb2f", size = 21887, upload-time = "2025-09-27T18:36:23.535Z" }, - { url = "https://files.pythonhosted.org/packages/b2/76/7edcab99d5349a4532a459e1fe64f0b0467a3365056ae550d3bcf3f79e1e/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:068f375c472b3e7acbe2d5318dea141359e6900156b5b2ba06a30b169086b91a", size = 23692, upload-time = "2025-09-27T18:36:24.823Z" }, - { url = "https://files.pythonhosted.org/packages/a4/28/6e74cdd26d7514849143d69f0bf2399f929c37dc2b31e6829fd2045b2765/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:7be7b61bb172e1ed687f1754f8e7484f1c8019780f6f6b0786e76bb01c2ae115", size = 21471, upload-time = "2025-09-27T18:36:25.95Z" }, - { url = "https://files.pythonhosted.org/packages/62/7e/a145f36a5c2945673e590850a6f8014318d5577ed7e5920a4b3448e0865d/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f9e130248f4462aaa8e2552d547f36ddadbeaa573879158d721bbd33dfe4743a", size = 22923, upload-time = "2025-09-27T18:36:27.109Z" }, - { url = "https://files.pythonhosted.org/packages/0f/62/d9c46a7f5c9adbeeeda52f5b8d802e1094e9717705a645efc71b0913a0a8/markupsafe-3.0.3-cp311-cp311-win32.whl", hash = "sha256:0db14f5dafddbb6d9208827849fad01f1a2609380add406671a26386cdf15a19", size = 14572, upload-time = "2025-09-27T18:36:28.045Z" }, - { url = "https://files.pythonhosted.org/packages/83/8a/4414c03d3f891739326e1783338e48fb49781cc915b2e0ee052aa490d586/markupsafe-3.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:de8a88e63464af587c950061a5e6a67d3632e36df62b986892331d4620a35c01", size = 15077, upload-time = "2025-09-27T18:36:29.025Z" }, - { url = "https://files.pythonhosted.org/packages/35/73/893072b42e6862f319b5207adc9ae06070f095b358655f077f69a35601f0/markupsafe-3.0.3-cp311-cp311-win_arm64.whl", hash = "sha256:3b562dd9e9ea93f13d53989d23a7e775fdfd1066c33494ff43f5418bc8c58a5c", size = 13876, upload-time = "2025-09-27T18:36:29.954Z" }, { url = "https://files.pythonhosted.org/packages/5a/72/147da192e38635ada20e0a2e1a51cf8823d2119ce8883f7053879c2199b5/markupsafe-3.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d53197da72cc091b024dd97249dfc7794d6a56530370992a5e1a08983ad9230e", size = 11615, upload-time = "2025-09-27T18:36:30.854Z" }, { url = "https://files.pythonhosted.org/packages/9a/81/7e4e08678a1f98521201c3079f77db69fb552acd56067661f8c2f534a718/markupsafe-3.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1872df69a4de6aead3491198eaf13810b565bdbeec3ae2dc8780f14458ec73ce", size = 12020, upload-time = "2025-09-27T18:36:31.971Z" }, { url = "https://files.pythonhosted.org/packages/1e/2c/799f4742efc39633a1b54a92eec4082e4f815314869865d876824c257c1e/markupsafe-3.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3a7e8ae81ae39e62a41ec302f972ba6ae23a5c5396c8e60113e9066ef893da0d", size = 24332, upload-time = "2025-09-27T18:36:32.813Z" }, @@ -1055,17 +992,6 @@ version = "2.4.3" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/10/8b/c265f4823726ab832de836cdd184d0986dcf94480f81e8739692a7ac7af2/numpy-2.4.3.tar.gz", hash = "sha256:483a201202b73495f00dbc83796c6ae63137a9bdade074f7648b3e32613412dd", size = 20727743, upload-time = "2026-03-09T07:58:53.426Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/f9/51/5093a2df15c4dc19da3f79d1021e891f5dcf1d9d1db6ba38891d5590f3fe/numpy-2.4.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:33b3bf58ee84b172c067f56aeadc7ee9ab6de69c5e800ab5b10295d54c581adb", size = 16957183, upload-time = "2026-03-09T07:55:57.774Z" }, - { url = "https://files.pythonhosted.org/packages/b5/7c/c061f3de0630941073d2598dc271ac2f6cbcf5c83c74a5870fea07488333/numpy-2.4.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:8ba7b51e71c05aa1f9bc3641463cd82308eab40ce0d5c7e1fd4038cbf9938147", size = 14968734, upload-time = "2026-03-09T07:56:00.494Z" }, - { url = "https://files.pythonhosted.org/packages/ef/27/d26c85cbcd86b26e4f125b0668e7a7c0542d19dd7d23ee12e87b550e95b5/numpy-2.4.3-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:a1988292870c7cb9d0ebb4cc96b4d447513a9644801de54606dc7aabf2b7d920", size = 5475288, upload-time = "2026-03-09T07:56:02.857Z" }, - { url = "https://files.pythonhosted.org/packages/2b/09/3c4abbc1dcd8010bf1a611d174c7aa689fc505585ec806111b4406f6f1b1/numpy-2.4.3-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:23b46bb6d8ecb68b58c09944483c135ae5f0e9b8d8858ece5e4ead783771d2a9", size = 6805253, upload-time = "2026-03-09T07:56:04.53Z" }, - { url = "https://files.pythonhosted.org/packages/21/bc/e7aa3f6817e40c3f517d407742337cbb8e6fc4b83ce0b55ab780c829243b/numpy-2.4.3-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a016db5c5dba78fa8fe9f5d80d6708f9c42ab087a739803c0ac83a43d686a470", size = 15969479, upload-time = "2026-03-09T07:56:06.638Z" }, - { url = "https://files.pythonhosted.org/packages/78/51/9f5d7a41f0b51649ddf2f2320595e15e122a40610b233d51928dd6c92353/numpy-2.4.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:715de7f82e192e8cae5a507a347d97ad17598f8e026152ca97233e3666daaa71", size = 16901035, upload-time = "2026-03-09T07:56:09.405Z" }, - { url = "https://files.pythonhosted.org/packages/64/6e/b221dd847d7181bc5ee4857bfb026182ef69499f9305eb1371cbb1aea626/numpy-2.4.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:2ddb7919366ee468342b91dea2352824c25b55814a987847b6c52003a7c97f15", size = 17325657, upload-time = "2026-03-09T07:56:12.067Z" }, - { url = "https://files.pythonhosted.org/packages/eb/b8/8f3fd2da596e1063964b758b5e3c970aed1949a05200d7e3d46a9d46d643/numpy-2.4.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:a315e5234d88067f2d97e1f2ef670a7569df445d55400f1e33d117418d008d52", size = 18635512, upload-time = "2026-03-09T07:56:14.629Z" }, - { url = "https://files.pythonhosted.org/packages/5c/24/2993b775c37e39d2f8ab4125b44337ab0b2ba106c100980b7c274a22bee7/numpy-2.4.3-cp311-cp311-win32.whl", hash = "sha256:2b3f8d2c4589b1a2028d2a770b0fc4d1f332fb5e01521f4de3199a896d158ddd", size = 6238100, upload-time = "2026-03-09T07:56:17.243Z" }, - { url = "https://files.pythonhosted.org/packages/76/1d/edccf27adedb754db7c4511d5eac8b83f004ae948fe2d3509e8b78097d4c/numpy-2.4.3-cp311-cp311-win_amd64.whl", hash = "sha256:77e76d932c49a75617c6d13464e41203cd410956614d0a0e999b25e9e8d27eec", size = 12609816, upload-time = "2026-03-09T07:56:19.089Z" }, - { url = "https://files.pythonhosted.org/packages/92/82/190b99153480076c8dce85f4cfe7d53ea84444145ffa54cb58dcd460d66b/numpy-2.4.3-cp311-cp311-win_arm64.whl", hash = "sha256:eb610595dd91560905c132c709412b512135a60f1851ccbd2c959e136431ff67", size = 10485757, upload-time = "2026-03-09T07:56:21.753Z" }, { url = "https://files.pythonhosted.org/packages/a9/ed/6388632536f9788cea23a3a1b629f25b43eaacd7d7377e5d6bc7b9deb69b/numpy-2.4.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:61b0cbabbb6126c8df63b9a3a0c4b1f44ebca5e12ff6997b80fcf267fb3150ef", size = 16669628, upload-time = "2026-03-09T07:56:24.252Z" }, { url = "https://files.pythonhosted.org/packages/74/1b/ee2abfc68e1ce728b2958b6ba831d65c62e1b13ce3017c13943f8f9b5b2e/numpy-2.4.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7395e69ff32526710748f92cd8c9849b361830968ea3e24a676f272653e8983e", size = 14696872, upload-time = "2026-03-09T07:56:26.991Z" }, { url = "https://files.pythonhosted.org/packages/ba/d1/780400e915ff5638166f11ca9dc2c5815189f3d7cf6f8759a1685e586413/numpy-2.4.3-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:abdce0f71dcb4a00e4e77f3faf05e4616ceccfe72ccaa07f47ee79cda3b7b0f4", size = 5203489, upload-time = "2026-03-09T07:56:29.414Z" }, @@ -1119,13 +1045,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/07/12/8160bea39da3335737b10308df4f484235fd297f556745f13092aa039d3b/numpy-2.4.3-cp314-cp314t-win32.whl", hash = "sha256:5e10da9e93247e554bb1d22f8edc51847ddd7dde52d85ce31024c1b4312bfba0", size = 6154547, upload-time = "2026-03-09T07:58:28.289Z" }, { url = "https://files.pythonhosted.org/packages/42/f3/76534f61f80d74cc9cdf2e570d3d4eeb92c2280a27c39b0aaf471eda7b48/numpy-2.4.3-cp314-cp314t-win_amd64.whl", hash = "sha256:45f003dbdffb997a03da2d1d0cb41fbd24a87507fb41605c0420a3db5bd4667b", size = 12633645, upload-time = "2026-03-09T07:58:30.384Z" }, { url = "https://files.pythonhosted.org/packages/1f/b6/7c0d4334c15983cec7f92a69e8ce9b1e6f31857e5ee3a413ac424e6bd63d/numpy-2.4.3-cp314-cp314t-win_arm64.whl", hash = "sha256:4d382735cecd7bcf090172489a525cd7d4087bc331f7df9f60ddc9a296cf208e", size = 10565454, upload-time = "2026-03-09T07:58:33.031Z" }, - { url = "https://files.pythonhosted.org/packages/64/e4/4dab9fb43c83719c29241c535d9e07be73bea4bc0c6686c5816d8e1b6689/numpy-2.4.3-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:c6b124bfcafb9e8d3ed09130dbee44848c20b3e758b6bbf006e641778927c028", size = 16834892, upload-time = "2026-03-09T07:58:35.334Z" }, - { url = "https://files.pythonhosted.org/packages/c9/29/f8b6d4af90fed3dfda84ebc0df06c9833d38880c79ce954e5b661758aa31/numpy-2.4.3-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:76dbb9d4e43c16cf9aa711fcd8de1e2eeb27539dcefb60a1d5e9f12fae1d1ed8", size = 14893070, upload-time = "2026-03-09T07:58:37.7Z" }, - { url = "https://files.pythonhosted.org/packages/9a/04/a19b3c91dbec0a49269407f15d5753673a09832daed40c45e8150e6fa558/numpy-2.4.3-pp311-pypy311_pp73-macosx_14_0_arm64.whl", hash = "sha256:29363fbfa6f8ee855d7569c96ce524845e3d726d6c19b29eceec7dd555dab152", size = 5399609, upload-time = "2026-03-09T07:58:39.853Z" }, - { url = "https://files.pythonhosted.org/packages/79/34/4d73603f5420eab89ea8a67097b31364bf7c30f811d4dd84b1659c7476d9/numpy-2.4.3-pp311-pypy311_pp73-macosx_14_0_x86_64.whl", hash = "sha256:bc71942c789ef415a37f0d4eab90341425a00d538cd0642445d30b41023d3395", size = 6714355, upload-time = "2026-03-09T07:58:42.365Z" }, - { url = "https://files.pythonhosted.org/packages/58/ad/1100d7229bb248394939a12a8074d485b655e8ed44207d328fdd7fcebc7b/numpy-2.4.3-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7e58765ad74dcebd3ef0208a5078fba32dc8ec3578fe84a604432950cd043d79", size = 15800434, upload-time = "2026-03-09T07:58:44.837Z" }, - { url = "https://files.pythonhosted.org/packages/0c/fd/16d710c085d28ba4feaf29ac60c936c9d662e390344f94a6beaa2ac9899b/numpy-2.4.3-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8e236dbda4e1d319d681afcbb136c0c4a8e0f1a5c58ceec2adebb547357fe857", size = 16729409, upload-time = "2026-03-09T07:58:47.972Z" }, - { url = "https://files.pythonhosted.org/packages/57/a7/b35835e278c18b85206834b3aa3abe68e77a98769c59233d1f6300284781/numpy-2.4.3-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:4b42639cdde6d24e732ff823a3fa5b701d8acad89c4142bc1d0bd6dc85200ba5", size = 12504685, upload-time = "2026-03-09T07:58:50.525Z" }, ] [[package]] @@ -1147,27 +1066,24 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/c0/5a/df122348638885526e53140e9c6b0d844af7312682b3bde9587eebc28b47/openai-2.28.0-py3-none-any.whl", hash = "sha256:79aa5c45dba7fef84085701c235cf13ba88485e1ef4f8dfcedc44fc2a698fc1d", size = 1141218, upload-time = "2026-03-13T19:56:25.46Z" }, ] +[[package]] +name = "opentelemetry-api" +version = "1.45.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/1f/dc/e12c1fe1ed8a7b7149777127b1a0e12ce5bd5a81d97408bedc2128c260f5/opentelemetry_api-1.45.0.tar.gz", hash = "sha256:711ede81773c8025c2c03dac0450bc89f3d30aea6eabcc815c570d4e35a963f7", size = 72115, upload-time = "2026-09-25T12:32:28.399Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/44/b9/040d1a1c7836922828e6480cd2366bb8fe0ebf75b413d2bb51a9b0e7f78f/opentelemetry_api-1.45.0-py3-none-any.whl", hash = "sha256:80e068aba7cd56c8b58512d6a36f8d25cb1dfaa0c0a4cc1c938ccf9f362d9cb3", size = 60020, upload-time = "2026-09-25T12:32:03.192Z" }, +] + [[package]] name = "orjson" version = "3.11.7" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/53/45/b268004f745ede84e5798b48ee12b05129d19235d0e15267aa57dcdb400b/orjson-3.11.7.tar.gz", hash = "sha256:9b1a67243945819ce55d24a30b59d6a168e86220452d2c96f4d1f093e71c0c49", size = 6144992, upload-time = "2026-02-02T15:38:49.29Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/37/02/da6cb01fc6087048d7f61522c327edf4250f1683a58a839fdcc435746dd5/orjson-3.11.7-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:9487abc2c2086e7c8eb9a211d2ce8855bae0e92586279d0d27b341d5ad76c85c", size = 228664, upload-time = "2026-02-02T15:37:25.542Z" }, - { url = "https://files.pythonhosted.org/packages/c1/c2/5885e7a5881dba9a9af51bc564e8967225a642b3e03d089289a35054e749/orjson-3.11.7-cp311-cp311-macosx_15_0_arm64.whl", hash = "sha256:79cacb0b52f6004caf92405a7e1f11e6e2de8bdf9019e4f76b44ba045125cd6b", size = 125344, upload-time = "2026-02-02T15:37:26.92Z" }, - { url = "https://files.pythonhosted.org/packages/a4/1d/4e7688de0a92d1caf600dfd5fb70b4c5bfff51dfa61ac555072ef2d0d32a/orjson-3.11.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c2e85fe4698b6a56d5e2ebf7ae87544d668eb6bde1ad1226c13f44663f20ec9e", size = 128404, upload-time = "2026-02-02T15:37:28.108Z" }, - { url = "https://files.pythonhosted.org/packages/2f/b2/ec04b74ae03a125db7bd69cffd014b227b7f341e3261bf75b5eb88a1aa92/orjson-3.11.7-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:b8d14b71c0b12963fe8a62aac87119f1afdf4cb88a400f61ca5ae581449efcb5", size = 123677, upload-time = "2026-02-02T15:37:30.287Z" }, - { url = "https://files.pythonhosted.org/packages/4c/69/f95bdf960605f08f827f6e3291fe243d8aa9c5c9ff017a8d7232209184c3/orjson-3.11.7-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:91c81ef070c8f3220054115e1ef468b1c9ce8497b4e526cb9f68ab4dc0a7ac62", size = 128950, upload-time = "2026-02-02T15:37:31.595Z" }, - { url = "https://files.pythonhosted.org/packages/a4/1b/de59c57bae1d148ef298852abd31909ac3089cff370dfd4cd84cc99cbc42/orjson-3.11.7-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:411ebaf34d735e25e358a6d9e7978954a9c9d58cfb47bc6683cdc3964cd2f910", size = 141756, upload-time = "2026-02-02T15:37:32.985Z" }, - { url = "https://files.pythonhosted.org/packages/ee/9e/9decc59f4499f695f65c650f6cfa6cd4c37a3fbe8fa235a0a3614cb54386/orjson-3.11.7-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a16bcd08ab0bcdfc7e8801d9c4a9cc17e58418e4d48ddc6ded4e9e4b1a94062b", size = 130812, upload-time = "2026-02-02T15:37:34.204Z" }, - { url = "https://files.pythonhosted.org/packages/28/e6/59f932bcabd1eac44e334fe8e3281a92eacfcb450586e1f4bde0423728d8/orjson-3.11.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c0b51672e466fd7e56230ffbae7f1639e18d0ce023351fb75da21b71bc2c960", size = 133444, upload-time = "2026-02-02T15:37:35.446Z" }, - { url = "https://files.pythonhosted.org/packages/f1/36/b0f05c0eaa7ca30bc965e37e6a2956b0d67adb87a9872942d3568da846ae/orjson-3.11.7-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:136dcd6a2e796dfd9ffca9fc027d778567b0b7c9968d092842d3c323cef88aa8", size = 138609, upload-time = "2026-02-02T15:37:36.657Z" }, - { url = "https://files.pythonhosted.org/packages/b8/03/58ec7d302b8d86944c60c7b4b82975d5161fcce4c9bc8c6cb1d6741b6115/orjson-3.11.7-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:7ba61079379b0ae29e117db13bda5f28d939766e410d321ec1624afc6a0b0504", size = 408918, upload-time = "2026-02-02T15:37:38.076Z" }, - { url = "https://files.pythonhosted.org/packages/06/3a/868d65ef9a8b99be723bd510de491349618abd9f62c826cf206d962db295/orjson-3.11.7-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:0527a4510c300e3b406591b0ba69b5dc50031895b0a93743526a3fc45f59d26e", size = 143998, upload-time = "2026-02-02T15:37:39.706Z" }, - { url = "https://files.pythonhosted.org/packages/5b/c7/1e18e1c83afe3349f4f6dc9e14910f0ae5f82eac756d1412ea4018938535/orjson-3.11.7-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:a709e881723c9b18acddcfb8ba357322491ad553e277cf467e1e7e20e2d90561", size = 134802, upload-time = "2026-02-02T15:37:41.002Z" }, - { url = "https://files.pythonhosted.org/packages/d4/0b/ccb7ee1a65b37e8eeb8b267dc953561d72370e85185e459616d4345bab34/orjson-3.11.7-cp311-cp311-win32.whl", hash = "sha256:c43b8b5bab288b6b90dac410cca7e986a4fa747a2e8f94615aea407da706980d", size = 127828, upload-time = "2026-02-02T15:37:42.241Z" }, - { url = "https://files.pythonhosted.org/packages/af/9e/55c776dffda3f381e0f07d010a4f5f3902bf48eaba1bb7684d301acd4924/orjson-3.11.7-cp311-cp311-win_amd64.whl", hash = "sha256:6543001328aa857187f905308a028935864aefe9968af3848401b6fe80dbb471", size = 124941, upload-time = "2026-02-02T15:37:43.444Z" }, - { url = "https://files.pythonhosted.org/packages/aa/8e/424a620fa7d263b880162505fb107ef5e0afaa765b5b06a88312ac291560/orjson-3.11.7-cp311-cp311-win_arm64.whl", hash = "sha256:1ee5cc7160a821dfe14f130bc8e63e7611051f964b463d9e2a3a573204446a4d", size = 126245, upload-time = "2026-02-02T15:37:45.18Z" }, { url = "https://files.pythonhosted.org/packages/80/bf/76f4f1665f6983385938f0e2a5d7efa12a58171b8456c252f3bae8a4cf75/orjson-3.11.7-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:bd03ea7606833655048dab1a00734a2875e3e86c276e1d772b2a02556f0d895f", size = 228545, upload-time = "2026-02-02T15:37:46.376Z" }, { url = "https://files.pythonhosted.org/packages/79/53/6c72c002cb13b5a978a068add59b25a8bdf2800ac1c9c8ecdb26d6d97064/orjson-3.11.7-cp312-cp312-macosx_15_0_arm64.whl", hash = "sha256:89e440ebc74ce8ab5c7bc4ce6757b4a6b1041becb127df818f6997b5c71aa60b", size = 125224, upload-time = "2026-02-02T15:37:47.697Z" }, { url = "https://files.pythonhosted.org/packages/2c/83/10e48852865e5dd151bdfe652c06f7da484578ed02c5fca938e3632cb0b8/orjson-3.11.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5ede977b5fe5ac91b1dffc0a517ca4542d2ec8a6a4ff7b2652d94f640796342a", size = 128154, upload-time = "2026-02-02T15:37:48.954Z" }, @@ -1221,15 +1137,6 @@ version = "1.12.2" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/12/0c/f1761e21486942ab9bb6feaebc610fa074f7c5e496e6962dea5873348077/ormsgpack-1.12.2.tar.gz", hash = "sha256:944a2233640273bee67521795a73cf1e959538e0dfb7ac635505010455e53b33", size = 39031, upload-time = "2026-01-18T20:55:28.023Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/4b/08/8b68f24b18e69d92238aa8f258218e6dfeacf4381d9d07ab8df303f524a9/ormsgpack-1.12.2-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:bd5f4bf04c37888e864f08e740c5a573c4017f6fd6e99fa944c5c935fabf2dd9", size = 378266, upload-time = "2026-01-18T20:55:59.876Z" }, - { url = "https://files.pythonhosted.org/packages/0d/24/29fc13044ecb7c153523ae0a1972269fcd613650d1fa1a9cec1044c6b666/ormsgpack-1.12.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:34d5b28b3570e9fed9a5a76528fc7230c3c76333bc214798958e58e9b79cc18a", size = 203035, upload-time = "2026-01-18T20:55:30.59Z" }, - { url = "https://files.pythonhosted.org/packages/ad/c2/00169fb25dd8f9213f5e8a549dfb73e4d592009ebc85fbbcd3e1dcac575b/ormsgpack-1.12.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3708693412c28f3538fb5a65da93787b6bbab3484f6bc6e935bfb77a62400ae5", size = 210539, upload-time = "2026-01-18T20:55:48.569Z" }, - { url = "https://files.pythonhosted.org/packages/1b/33/543627f323ff3c73091f51d6a20db28a1a33531af30873ea90c5ac95a9b5/ormsgpack-1.12.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:43013a3f3e2e902e1d05e72c0f1aeb5bedbb8e09240b51e26792a3c89267e181", size = 212401, upload-time = "2026-01-18T20:56:10.101Z" }, - { url = "https://files.pythonhosted.org/packages/e8/5d/f70e2c3da414f46186659d24745483757bcc9adccb481a6eb93e2b729301/ormsgpack-1.12.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:7c8b1667a72cbba74f0ae7ecf3105a5e01304620ed14528b2cb4320679d2869b", size = 387082, upload-time = "2026-01-18T20:56:12.047Z" }, - { url = "https://files.pythonhosted.org/packages/c0/d6/06e8dc920c7903e051f30934d874d4afccc9bb1c09dcaf0bc03a7de4b343/ormsgpack-1.12.2-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:df6961442140193e517303d0b5d7bc2e20e69a879c2d774316125350c4a76b92", size = 482346, upload-time = "2026-01-18T20:56:05.152Z" }, - { url = "https://files.pythonhosted.org/packages/66/c4/f337ac0905eed9c393ef990c54565cd33644918e0a8031fe48c098c71dbf/ormsgpack-1.12.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:c6a4c34ddef109647c769d69be65fa1de7a6022b02ad45546a69b3216573eb4a", size = 425181, upload-time = "2026-01-18T20:55:37.83Z" }, - { url = "https://files.pythonhosted.org/packages/78/29/6d5758fabef3babdf4bbbc453738cc7de9cd3334e4c38dd5737e27b85653/ormsgpack-1.12.2-cp311-cp311-win_amd64.whl", hash = "sha256:73670ed0375ecc303858e3613f407628dd1fca18fe6ac57b7b7ce66cc7bb006c", size = 117182, upload-time = "2026-01-18T20:55:31.472Z" }, - { url = "https://files.pythonhosted.org/packages/c4/57/17a15549233c37e7fd054c48fe9207492e06b026dbd872b826a0b5f833b6/ormsgpack-1.12.2-cp311-cp311-win_arm64.whl", hash = "sha256:c2be829954434e33601ae5da328cccce3266b098927ca7a30246a0baec2ce7bd", size = 111464, upload-time = "2026-01-18T20:55:38.811Z" }, { url = "https://files.pythonhosted.org/packages/4c/36/16c4b1921c308a92cef3bf6663226ae283395aa0ff6e154f925c32e91ff5/ormsgpack-1.12.2-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:7a29d09b64b9694b588ff2f80e9826bdceb3a2b91523c5beae1fab27d5c940e7", size = 378618, upload-time = "2026-01-18T20:55:50.835Z" }, { url = "https://files.pythonhosted.org/packages/c0/68/468de634079615abf66ed13bb5c34ff71da237213f29294363beeeca5306/ormsgpack-1.12.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b39e629fd2e1c5b2f46f99778450b59454d1f901bc507963168985e79f09c5d", size = 203186, upload-time = "2026-01-18T20:56:11.163Z" }, { url = "https://files.pythonhosted.org/packages/73/a9/d756e01961442688b7939bacd87ce13bfad7d26ce24f910f6028178b2cc8/ormsgpack-1.12.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:958dcb270d30a7cb633a45ee62b9444433fa571a752d2ca484efdac07480876e", size = 210738, upload-time = "2026-01-18T20:56:09.181Z" }, @@ -1284,13 +1191,6 @@ dependencies = [ ] sdist = { url = "https://files.pythonhosted.org/packages/33/01/d40b85317f86cf08d853a4f495195c73815fdf205eef3993821720274518/pandas-2.3.3.tar.gz", hash = "sha256:e05e1af93b977f7eafa636d043f9f94c7ee3ac81af99c13508215942e64c993b", size = 4495223, upload-time = "2025-09-29T23:34:51.853Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/c1/fa/7ac648108144a095b4fb6aa3de1954689f7af60a14cf25583f4960ecb878/pandas-2.3.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:602b8615ebcc4a0c1751e71840428ddebeb142ec02c786e8ad6b1ce3c8dec523", size = 11578790, upload-time = "2025-09-29T23:18:30.065Z" }, - { url = "https://files.pythonhosted.org/packages/9b/35/74442388c6cf008882d4d4bdfc4109be87e9b8b7ccd097ad1e7f006e2e95/pandas-2.3.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:8fe25fc7b623b0ef6b5009149627e34d2a4657e880948ec3c840e9402e5c1b45", size = 10833831, upload-time = "2025-09-29T23:38:56.071Z" }, - { url = "https://files.pythonhosted.org/packages/fe/e4/de154cbfeee13383ad58d23017da99390b91d73f8c11856f2095e813201b/pandas-2.3.3-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b468d3dad6ff947df92dcb32ede5b7bd41a9b3cceef0a30ed925f6d01fb8fa66", size = 12199267, upload-time = "2025-09-29T23:18:41.627Z" }, - { url = "https://files.pythonhosted.org/packages/bf/c9/63f8d545568d9ab91476b1818b4741f521646cbdd151c6efebf40d6de6f7/pandas-2.3.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b98560e98cb334799c0b07ca7967ac361a47326e9b4e5a7dfb5ab2b1c9d35a1b", size = 12789281, upload-time = "2025-09-29T23:18:56.834Z" }, - { url = "https://files.pythonhosted.org/packages/f2/00/a5ac8c7a0e67fd1a6059e40aa08fa1c52cc00709077d2300e210c3ce0322/pandas-2.3.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d37b5848ba49824e5c30bedb9c830ab9b7751fd049bc7914533e01c65f79791", size = 13240453, upload-time = "2025-09-29T23:19:09.247Z" }, - { url = "https://files.pythonhosted.org/packages/27/4d/5c23a5bc7bd209231618dd9e606ce076272c9bc4f12023a70e03a86b4067/pandas-2.3.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:db4301b2d1f926ae677a751eb2bd0e8c5f5319c9cb3f88b0becbbb0b07b34151", size = 13890361, upload-time = "2025-09-29T23:19:25.342Z" }, - { url = "https://files.pythonhosted.org/packages/8e/59/712db1d7040520de7a4965df15b774348980e6df45c129b8c64d0dbe74ef/pandas-2.3.3-cp311-cp311-win_amd64.whl", hash = "sha256:f086f6fe114e19d92014a1966f43a3e62285109afe874f067f5abbdcbb10e59c", size = 11348702, upload-time = "2025-09-29T23:19:38.296Z" }, { url = "https://files.pythonhosted.org/packages/9c/fb/231d89e8637c808b997d172b18e9d4a4bc7bf31296196c260526055d1ea0/pandas-2.3.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:6d21f6d74eb1725c2efaa71a2bfc661a0689579b58e9c0ca58a739ff0b002b53", size = 11597846, upload-time = "2025-09-29T23:19:48.856Z" }, { url = "https://files.pythonhosted.org/packages/5c/bd/bf8064d9cfa214294356c2d6702b716d3cf3bb24be59287a6a21e24cae6b/pandas-2.3.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3fd2f887589c7aa868e02632612ba39acb0b8948faf5cc58f0850e165bd46f35", size = 10729618, upload-time = "2025-09-29T23:39:08.659Z" }, { url = "https://files.pythonhosted.org/packages/57/56/cf2dbe1a3f5271370669475ead12ce77c61726ffd19a35546e31aa8edf4e/pandas-2.3.3-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ecaf1e12bdc03c86ad4a7ea848d66c685cb6851d807a26aa245ca3d2017a1908", size = 11737212, upload-time = "2025-09-29T23:19:59.765Z" }, @@ -1332,17 +1232,6 @@ version = "12.1.1" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/1f/42/5c74462b4fd957fcd7b13b04fb3205ff8349236ea74c7c375766d6c82288/pillow-12.1.1.tar.gz", hash = "sha256:9ad8fa5937ab05218e2b6a4cff30295ad35afd2f83ac592e68c0d871bb0fdbc4", size = 46980264, upload-time = "2026-02-11T04:23:07.146Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/2b/46/5da1ec4a5171ee7bf1a0efa064aba70ba3d6e0788ce3f5acd1375d23c8c0/pillow-12.1.1-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:e879bb6cd5c73848ef3b2b48b8af9ff08c5b71ecda8048b7dd22d8a33f60be32", size = 5304084, upload-time = "2026-02-11T04:20:27.501Z" }, - { url = "https://files.pythonhosted.org/packages/78/93/a29e9bc02d1cf557a834da780ceccd54e02421627200696fcf805ebdc3fb/pillow-12.1.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:365b10bb9417dd4498c0e3b128018c4a624dc11c7b97d8cc54effe3b096f4c38", size = 4657866, upload-time = "2026-02-11T04:20:29.827Z" }, - { url = "https://files.pythonhosted.org/packages/13/84/583a4558d492a179d31e4aae32eadce94b9acf49c0337c4ce0b70e0a01f2/pillow-12.1.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d4ce8e329c93845720cd2014659ca67eac35f6433fd3050393d85f3ecef0dad5", size = 6232148, upload-time = "2026-02-11T04:20:31.329Z" }, - { url = "https://files.pythonhosted.org/packages/d5/e2/53c43334bbbb2d3b938978532fbda8e62bb6e0b23a26ce8592f36bcc4987/pillow-12.1.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fc354a04072b765eccf2204f588a7a532c9511e8b9c7f900e1b64e3e33487090", size = 8038007, upload-time = "2026-02-11T04:20:34.225Z" }, - { url = "https://files.pythonhosted.org/packages/b8/a6/3d0e79c8a9d58150dd98e199d7c1c56861027f3829a3a60b3c2784190180/pillow-12.1.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7e7976bf1910a8116b523b9f9f58bf410f3e8aa330cd9a2bb2953f9266ab49af", size = 6345418, upload-time = "2026-02-11T04:20:35.858Z" }, - { url = "https://files.pythonhosted.org/packages/a2/c8/46dfeac5825e600579157eea177be43e2f7ff4a99da9d0d0a49533509ac5/pillow-12.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:597bd9c8419bc7c6af5604e55847789b69123bbe25d65cc6ad3012b4f3c98d8b", size = 7034590, upload-time = "2026-02-11T04:20:37.91Z" }, - { url = "https://files.pythonhosted.org/packages/af/bf/e6f65d3db8a8bbfeaf9e13cc0417813f6319863a73de934f14b2229ada18/pillow-12.1.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:2c1fc0f2ca5f96a3c8407e41cca26a16e46b21060fe6d5b099d2cb01412222f5", size = 6458655, upload-time = "2026-02-11T04:20:39.496Z" }, - { url = "https://files.pythonhosted.org/packages/f9/c2/66091f3f34a25894ca129362e510b956ef26f8fb67a0e6417bc5744e56f1/pillow-12.1.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:578510d88c6229d735855e1f278aa305270438d36a05031dfaae5067cc8eb04d", size = 7159286, upload-time = "2026-02-11T04:20:41.139Z" }, - { url = "https://files.pythonhosted.org/packages/7b/5a/24bc8eb526a22f957d0cec6243146744966d40857e3d8deb68f7902ca6c1/pillow-12.1.1-cp311-cp311-win32.whl", hash = "sha256:7311c0a0dcadb89b36b7025dfd8326ecfa36964e29913074d47382706e516a7c", size = 6328663, upload-time = "2026-02-11T04:20:43.184Z" }, - { url = "https://files.pythonhosted.org/packages/31/03/bef822e4f2d8f9d7448c133d0a18185d3cce3e70472774fffefe8b0ed562/pillow-12.1.1-cp311-cp311-win_amd64.whl", hash = "sha256:fbfa2a7c10cc2623f412753cddf391c7f971c52ca40a3f65dc5039b2939e8563", size = 7031448, upload-time = "2026-02-11T04:20:44.696Z" }, - { url = "https://files.pythonhosted.org/packages/49/70/f76296f53610bd17b2e7d31728b8b7825e3ac3b5b3688b51f52eab7c0818/pillow-12.1.1-cp311-cp311-win_arm64.whl", hash = "sha256:b81b5e3511211631b3f672a595e3221252c90af017e399056d0faabb9538aa80", size = 2453651, upload-time = "2026-02-11T04:20:46.243Z" }, { url = "https://files.pythonhosted.org/packages/07/d3/8df65da0d4df36b094351dce696f2989bec731d4f10e743b1c5f4da4d3bf/pillow-12.1.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:ab323b787d6e18b3d91a72fc99b1a2c28651e4358749842b8f8dfacd28ef2052", size = 5262803, upload-time = "2026-02-11T04:20:47.653Z" }, { url = "https://files.pythonhosted.org/packages/d6/71/5026395b290ff404b836e636f51d7297e6c83beceaa87c592718747e670f/pillow-12.1.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:adebb5bee0f0af4909c30db0d890c773d1a92ffe83da908e2e9e720f8edf3984", size = 4657601, upload-time = "2026-02-11T04:20:49.328Z" }, { url = "https://files.pythonhosted.org/packages/b1/2e/1001613d941c67442f745aff0f7cc66dd8df9a9c084eb497e6a543ee6f7e/pillow-12.1.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:bb66b7cc26f50977108790e2456b7921e773f23db5630261102233eb355a3b79", size = 6234995, upload-time = "2026-02-11T04:20:51.032Z" }, @@ -1404,13 +1293,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/01/4a/9202e8d11714c1fc5951f2e1ef362f2d7fbc595e1f6717971d5dd750e969/pillow-12.1.1-cp314-cp314t-win32.whl", hash = "sha256:d2912fd8114fc5545aa3a4b5576512f64c55a03f3ebcca4c10194d593d43ea36", size = 6438736, upload-time = "2026-02-11T04:22:46.347Z" }, { url = "https://files.pythonhosted.org/packages/f3/ca/cbce2327eb9885476b3957b2e82eb12c866a8b16ad77392864ad601022ce/pillow-12.1.1-cp314-cp314t-win_amd64.whl", hash = "sha256:4ceb838d4bd9dab43e06c363cab2eebf63846d6a4aeaea283bbdfd8f1a8ed58b", size = 7182894, upload-time = "2026-02-11T04:22:48.114Z" }, { url = "https://files.pythonhosted.org/packages/ec/d2/de599c95ba0a973b94410477f8bf0b6f0b5e67360eb89bcb1ad365258beb/pillow-12.1.1-cp314-cp314t-win_arm64.whl", hash = "sha256:7b03048319bfc6170e93bd60728a1af51d3dd7704935feb228c4d4faab35d334", size = 2546446, upload-time = "2026-02-11T04:22:50.342Z" }, - { url = "https://files.pythonhosted.org/packages/56/11/5d43209aa4cb58e0cc80127956ff1796a68b928e6324bbf06ef4db34367b/pillow-12.1.1-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:600fd103672b925fe62ed08e0d874ea34d692474df6f4bf7ebe148b30f89f39f", size = 5228606, upload-time = "2026-02-11T04:22:52.106Z" }, - { url = "https://files.pythonhosted.org/packages/5f/d5/3b005b4e4fda6698b371fa6c21b097d4707585d7db99e98d9b0b87ac612a/pillow-12.1.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:665e1b916b043cef294bc54d47bf02d87e13f769bc4bc5fa225a24b3a6c5aca9", size = 4622321, upload-time = "2026-02-11T04:22:53.827Z" }, - { url = "https://files.pythonhosted.org/packages/df/36/ed3ea2d594356fd8037e5a01f6156c74bc8d92dbb0fa60746cc96cabb6e8/pillow-12.1.1-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:495c302af3aad1ca67420ddd5c7bd480c8867ad173528767d906428057a11f0e", size = 5247579, upload-time = "2026-02-11T04:22:56.094Z" }, - { url = "https://files.pythonhosted.org/packages/54/9a/9cc3e029683cf6d20ae5085da0dafc63148e3252c2f13328e553aaa13cfb/pillow-12.1.1-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:8fd420ef0c52c88b5a035a0886f367748c72147b2b8f384c9d12656678dfdfa9", size = 6989094, upload-time = "2026-02-11T04:22:58.288Z" }, - { url = "https://files.pythonhosted.org/packages/00/98/fc53ab36da80b88df0967896b6c4b4cd948a0dc5aa40a754266aa3ae48b3/pillow-12.1.1-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f975aa7ef9684ce7e2c18a3aa8f8e2106ce1e46b94ab713d156b2898811651d3", size = 5313850, upload-time = "2026-02-11T04:23:00.554Z" }, - { url = "https://files.pythonhosted.org/packages/30/02/00fa585abfd9fe9d73e5f6e554dc36cc2b842898cbfc46d70353dae227f8/pillow-12.1.1-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8089c852a56c2966cf18835db62d9b34fef7ba74c726ad943928d494fa7f4735", size = 5963343, upload-time = "2026-02-11T04:23:02.934Z" }, - { url = "https://files.pythonhosted.org/packages/f2/26/c56ce33ca856e358d27fda9676c055395abddb82c35ac0f593877ed4562e/pillow-12.1.1-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:cb9bb857b2d057c6dfc72ac5f3b44836924ba15721882ef103cecb40d002d80e", size = 7029880, upload-time = "2026-02-11T04:23:04.783Z" }, ] [[package]] @@ -1443,13 +1325,6 @@ version = "23.0.1" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/88/22/134986a4cc224d593c1afde5494d18ff629393d74cc2eddb176669f234a4/pyarrow-23.0.1.tar.gz", hash = "sha256:b8c5873e33440b2bc2f4a79d2b47017a89c5a24116c055625e6f2ee50523f019", size = 1167336, upload-time = "2026-02-16T10:14:12.39Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/b0/41/8e6b6ef7e225d4ceead8459427a52afdc23379768f54dd3566014d7618c1/pyarrow-23.0.1-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:6f0147ee9e0386f519c952cc670eb4a8b05caa594eeffe01af0e25f699e4e9bb", size = 34302230, upload-time = "2026-02-16T10:09:03.859Z" }, - { url = "https://files.pythonhosted.org/packages/bf/4a/1472c00392f521fea03ae93408bf445cc7bfa1ab81683faf9bc188e36629/pyarrow-23.0.1-cp311-cp311-macosx_12_0_x86_64.whl", hash = "sha256:0ae6e17c828455b6265d590100c295193f93cc5675eb0af59e49dbd00d2de350", size = 35850050, upload-time = "2026-02-16T10:09:11.877Z" }, - { url = "https://files.pythonhosted.org/packages/0c/b2/bd1f2f05ded56af7f54d702c8364c9c43cd6abb91b0e9933f3d77b4f4132/pyarrow-23.0.1-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:fed7020203e9ef273360b9e45be52a2a47d3103caf156a30ace5247ffb51bdbd", size = 44491918, upload-time = "2026-02-16T10:09:18.144Z" }, - { url = "https://files.pythonhosted.org/packages/0b/62/96459ef5b67957eac38a90f541d1c28833d1b367f014a482cb63f3b7cd2d/pyarrow-23.0.1-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:26d50dee49d741ac0e82185033488d28d35be4d763ae6f321f97d1140eb7a0e9", size = 47562811, upload-time = "2026-02-16T10:09:25.792Z" }, - { url = "https://files.pythonhosted.org/packages/7d/94/1170e235add1f5f45a954e26cd0e906e7e74e23392dcb560de471f7366ec/pyarrow-23.0.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:3c30143b17161310f151f4a2bcfe41b5ff744238c1039338779424e38579d701", size = 48183766, upload-time = "2026-02-16T10:09:34.645Z" }, - { url = "https://files.pythonhosted.org/packages/0e/2d/39a42af4570377b99774cdb47f63ee6c7da7616bd55b3d5001aa18edfe4f/pyarrow-23.0.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:db2190fa79c80a23fdd29fef4b8992893f024ae7c17d2f5f4db7171fa30c2c78", size = 50607669, upload-time = "2026-02-16T10:09:44.153Z" }, - { url = "https://files.pythonhosted.org/packages/00/ca/db94101c187f3df742133ac837e93b1f269ebdac49427f8310ee40b6a58f/pyarrow-23.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:f00f993a8179e0e1c9713bcc0baf6d6c01326a406a9c23495ec1ba9c9ebf2919", size = 27527698, upload-time = "2026-02-16T10:09:50.263Z" }, { url = "https://files.pythonhosted.org/packages/9a/4b/4166bb5abbfe6f750fc60ad337c43ecf61340fa52ab386da6e8dbf9e63c4/pyarrow-23.0.1-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:f4b0dbfa124c0bb161f8b5ebb40f1a680b70279aa0c9901d44a2b5a20806039f", size = 34214575, upload-time = "2026-02-16T10:09:56.225Z" }, { url = "https://files.pythonhosted.org/packages/e1/da/3f941e3734ac8088ea588b53e860baeddac8323ea40ce22e3d0baa865cc9/pyarrow-23.0.1-cp312-cp312-macosx_12_0_x86_64.whl", hash = "sha256:7707d2b6673f7de054e2e83d59f9e805939038eebe1763fe811ee8fa5c0cd1a7", size = 35832540, upload-time = "2026-02-16T10:10:03.428Z" }, { url = "https://files.pythonhosted.org/packages/88/7c/3d841c366620e906d54430817531b877ba646310296df42ef697308c2705/pyarrow-23.0.1-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:86ff03fb9f1a320266e0de855dee4b17da6794c595d207f89bba40d16b5c78b9", size = 44470940, upload-time = "2026-02-16T10:10:10.704Z" }, @@ -1511,20 +1386,6 @@ dependencies = [ ] sdist = { url = "https://files.pythonhosted.org/packages/71/70/23b021c950c2addd24ec408e9ab05d59b035b39d97cdc1130e1bce647bb6/pydantic_core-2.41.5.tar.gz", hash = "sha256:08daa51ea16ad373ffd5e7606252cc32f07bc72b28284b6bc9c6df804816476e", size = 460952, upload-time = "2025-11-04T13:43:49.098Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/e8/72/74a989dd9f2084b3d9530b0915fdda64ac48831c30dbf7c72a41a5232db8/pydantic_core-2.41.5-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:a3a52f6156e73e7ccb0f8cced536adccb7042be67cb45f9562e12b319c119da6", size = 2105873, upload-time = "2025-11-04T13:39:31.373Z" }, - { url = "https://files.pythonhosted.org/packages/12/44/37e403fd9455708b3b942949e1d7febc02167662bf1a7da5b78ee1ea2842/pydantic_core-2.41.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7f3bf998340c6d4b0c9a2f02d6a400e51f123b59565d74dc60d252ce888c260b", size = 1899826, upload-time = "2025-11-04T13:39:32.897Z" }, - { url = "https://files.pythonhosted.org/packages/33/7f/1d5cab3ccf44c1935a359d51a8a2a9e1a654b744b5e7f80d41b88d501eec/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:378bec5c66998815d224c9ca994f1e14c0c21cb95d2f52b6021cc0b2a58f2a5a", size = 1917869, upload-time = "2025-11-04T13:39:34.469Z" }, - { url = "https://files.pythonhosted.org/packages/6e/6a/30d94a9674a7fe4f4744052ed6c5e083424510be1e93da5bc47569d11810/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e7b576130c69225432866fe2f4a469a85a54ade141d96fd396dffcf607b558f8", size = 2063890, upload-time = "2025-11-04T13:39:36.053Z" }, - { url = "https://files.pythonhosted.org/packages/50/be/76e5d46203fcb2750e542f32e6c371ffa9b8ad17364cf94bb0818dbfb50c/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6cb58b9c66f7e4179a2d5e0f849c48eff5c1fca560994d6eb6543abf955a149e", size = 2229740, upload-time = "2025-11-04T13:39:37.753Z" }, - { url = "https://files.pythonhosted.org/packages/d3/ee/fed784df0144793489f87db310a6bbf8118d7b630ed07aa180d6067e653a/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:88942d3a3dff3afc8288c21e565e476fc278902ae4d6d134f1eeda118cc830b1", size = 2350021, upload-time = "2025-11-04T13:39:40.94Z" }, - { url = "https://files.pythonhosted.org/packages/c8/be/8fed28dd0a180dca19e72c233cbf58efa36df055e5b9d90d64fd1740b828/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f31d95a179f8d64d90f6831d71fa93290893a33148d890ba15de25642c5d075b", size = 2066378, upload-time = "2025-11-04T13:39:42.523Z" }, - { url = "https://files.pythonhosted.org/packages/b0/3b/698cf8ae1d536a010e05121b4958b1257f0b5522085e335360e53a6b1c8b/pydantic_core-2.41.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c1df3d34aced70add6f867a8cf413e299177e0c22660cc767218373d0779487b", size = 2175761, upload-time = "2025-11-04T13:39:44.553Z" }, - { url = "https://files.pythonhosted.org/packages/b8/ba/15d537423939553116dea94ce02f9c31be0fa9d0b806d427e0308ec17145/pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:4009935984bd36bd2c774e13f9a09563ce8de4abaa7226f5108262fa3e637284", size = 2146303, upload-time = "2025-11-04T13:39:46.238Z" }, - { url = "https://files.pythonhosted.org/packages/58/7f/0de669bf37d206723795f9c90c82966726a2ab06c336deba4735b55af431/pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:34a64bc3441dc1213096a20fe27e8e128bd3ff89921706e83c0b1ac971276594", size = 2340355, upload-time = "2025-11-04T13:39:48.002Z" }, - { url = "https://files.pythonhosted.org/packages/e5/de/e7482c435b83d7e3c3ee5ee4451f6e8973cff0eb6007d2872ce6383f6398/pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c9e19dd6e28fdcaa5a1de679aec4141f691023916427ef9bae8584f9c2fb3b0e", size = 2319875, upload-time = "2025-11-04T13:39:49.705Z" }, - { url = "https://files.pythonhosted.org/packages/fe/e6/8c9e81bb6dd7560e33b9053351c29f30c8194b72f2d6932888581f503482/pydantic_core-2.41.5-cp311-cp311-win32.whl", hash = "sha256:2c010c6ded393148374c0f6f0bf89d206bf3217f201faa0635dcd56bd1520f6b", size = 1987549, upload-time = "2025-11-04T13:39:51.842Z" }, - { url = "https://files.pythonhosted.org/packages/11/66/f14d1d978ea94d1bc21fc98fcf570f9542fe55bfcc40269d4e1a21c19bf7/pydantic_core-2.41.5-cp311-cp311-win_amd64.whl", hash = "sha256:76ee27c6e9c7f16f47db7a94157112a2f3a00e958bc626e2f4ee8bec5c328fbe", size = 2011305, upload-time = "2025-11-04T13:39:53.485Z" }, - { url = "https://files.pythonhosted.org/packages/56/d8/0e271434e8efd03186c5386671328154ee349ff0354d83c74f5caaf096ed/pydantic_core-2.41.5-cp311-cp311-win_arm64.whl", hash = "sha256:4bc36bbc0b7584de96561184ad7f012478987882ebf9f9c389b23f432ea3d90f", size = 1972902, upload-time = "2025-11-04T13:39:56.488Z" }, { url = "https://files.pythonhosted.org/packages/5f/5d/5f6c63eebb5afee93bcaae4ce9a898f3373ca23df3ccaef086d0233a35a7/pydantic_core-2.41.5-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:f41a7489d32336dbf2199c8c0a215390a751c5b014c2c1c5366e817202e9cdf7", size = 2110990, upload-time = "2025-11-04T13:39:58.079Z" }, { url = "https://files.pythonhosted.org/packages/aa/32/9c2e8ccb57c01111e0fd091f236c7b371c1bccea0fa85247ac55b1e2b6b6/pydantic_core-2.41.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:070259a8818988b9a84a449a2a7337c7f430a22acc0859c6b110aa7212a6d9c0", size = 1896003, upload-time = "2025-11-04T13:39:59.956Z" }, { url = "https://files.pythonhosted.org/packages/68/b8/a01b53cb0e59139fbc9e4fda3e9724ede8de279097179be4ff31f1abb65a/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e96cea19e34778f8d59fe40775a7a574d95816eb150850a85a7a4c8f4b94ac69", size = 1919200, upload-time = "2025-11-04T13:40:02.241Z" }, @@ -1581,22 +1442,10 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/5c/96/5fb7d8c3c17bc8c62fdb031c47d77a1af698f1d7a406b0f79aaa1338f9ad/pydantic_core-2.41.5-cp314-cp314t-win32.whl", hash = "sha256:b4ececa40ac28afa90871c2cc2b9ffd2ff0bf749380fbdf57d165fd23da353aa", size = 1988906, upload-time = "2025-11-04T13:41:56.606Z" }, { url = "https://files.pythonhosted.org/packages/22/ed/182129d83032702912c2e2d8bbe33c036f342cc735737064668585dac28f/pydantic_core-2.41.5-cp314-cp314t-win_amd64.whl", hash = "sha256:80aa89cad80b32a912a65332f64a4450ed00966111b6615ca6816153d3585a8c", size = 1981607, upload-time = "2025-11-04T13:41:58.889Z" }, { url = "https://files.pythonhosted.org/packages/9f/ed/068e41660b832bb0b1aa5b58011dea2a3fe0ba7861ff38c4d4904c1c1a99/pydantic_core-2.41.5-cp314-cp314t-win_arm64.whl", hash = "sha256:35b44f37a3199f771c3eaa53051bc8a70cd7b54f333531c59e29fd4db5d15008", size = 1974769, upload-time = "2025-11-04T13:42:01.186Z" }, - { url = "https://files.pythonhosted.org/packages/11/72/90fda5ee3b97e51c494938a4a44c3a35a9c96c19bba12372fb9c634d6f57/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:b96d5f26b05d03cc60f11a7761a5ded1741da411e7fe0909e27a5e6a0cb7b034", size = 2115441, upload-time = "2025-11-04T13:42:39.557Z" }, - { url = "https://files.pythonhosted.org/packages/1f/53/8942f884fa33f50794f119012dc6a1a02ac43a56407adaac20463df8e98f/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:634e8609e89ceecea15e2d61bc9ac3718caaaa71963717bf3c8f38bfde64242c", size = 1930291, upload-time = "2025-11-04T13:42:42.169Z" }, - { url = "https://files.pythonhosted.org/packages/79/c8/ecb9ed9cd942bce09fc888ee960b52654fbdbede4ba6c2d6e0d3b1d8b49c/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:93e8740d7503eb008aa2df04d3b9735f845d43ae845e6dcd2be0b55a2da43cd2", size = 1948632, upload-time = "2025-11-04T13:42:44.564Z" }, - { url = "https://files.pythonhosted.org/packages/2e/1b/687711069de7efa6af934e74f601e2a4307365e8fdc404703afc453eab26/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f15489ba13d61f670dcc96772e733aad1a6f9c429cc27574c6cdaed82d0146ad", size = 2138905, upload-time = "2025-11-04T13:42:47.156Z" }, { url = "https://files.pythonhosted.org/packages/09/32/59b0c7e63e277fa7911c2fc70ccfb45ce4b98991e7ef37110663437005af/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:7da7087d756b19037bc2c06edc6c170eeef3c3bafcb8f532ff17d64dc427adfd", size = 2110495, upload-time = "2025-11-04T13:42:49.689Z" }, { url = "https://files.pythonhosted.org/packages/aa/81/05e400037eaf55ad400bcd318c05bb345b57e708887f07ddb2d20e3f0e98/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:aabf5777b5c8ca26f7824cb4a120a740c9588ed58df9b2d196ce92fba42ff8dc", size = 1915388, upload-time = "2025-11-04T13:42:52.215Z" }, { url = "https://files.pythonhosted.org/packages/6e/0d/e3549b2399f71d56476b77dbf3cf8937cec5cd70536bdc0e374a421d0599/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c007fe8a43d43b3969e8469004e9845944f1a80e6acd47c150856bb87f230c56", size = 1942879, upload-time = "2025-11-04T13:42:56.483Z" }, { url = "https://files.pythonhosted.org/packages/f7/07/34573da085946b6a313d7c42f82f16e8920bfd730665de2d11c0c37a74b5/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:76d0819de158cd855d1cbb8fcafdf6f5cf1eb8e470abe056d5d161106e38062b", size = 2139017, upload-time = "2025-11-04T13:42:59.471Z" }, - { url = "https://files.pythonhosted.org/packages/5f/9b/1b3f0e9f9305839d7e84912f9e8bfbd191ed1b1ef48083609f0dabde978c/pydantic_core-2.41.5-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b2379fa7ed44ddecb5bfe4e48577d752db9fc10be00a6b7446e9663ba143de26", size = 2101980, upload-time = "2025-11-04T13:43:25.97Z" }, - { url = "https://files.pythonhosted.org/packages/a4/ed/d71fefcb4263df0da6a85b5d8a7508360f2f2e9b3bf5814be9c8bccdccc1/pydantic_core-2.41.5-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:266fb4cbf5e3cbd0b53669a6d1b039c45e3ce651fd5442eff4d07c2cc8d66808", size = 1923865, upload-time = "2025-11-04T13:43:28.763Z" }, - { url = "https://files.pythonhosted.org/packages/ce/3a/626b38db460d675f873e4444b4bb030453bbe7b4ba55df821d026a0493c4/pydantic_core-2.41.5-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58133647260ea01e4d0500089a8c4f07bd7aa6ce109682b1426394988d8aaacc", size = 2134256, upload-time = "2025-11-04T13:43:31.71Z" }, - { url = "https://files.pythonhosted.org/packages/83/d9/8412d7f06f616bbc053d30cb4e5f76786af3221462ad5eee1f202021eb4e/pydantic_core-2.41.5-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:287dad91cfb551c363dc62899a80e9e14da1f0e2b6ebde82c806612ca2a13ef1", size = 2174762, upload-time = "2025-11-04T13:43:34.744Z" }, - { url = "https://files.pythonhosted.org/packages/55/4c/162d906b8e3ba3a99354e20faa1b49a85206c47de97a639510a0e673f5da/pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:03b77d184b9eb40240ae9fd676ca364ce1085f203e1b1256f8ab9984dca80a84", size = 2143141, upload-time = "2025-11-04T13:43:37.701Z" }, - { url = "https://files.pythonhosted.org/packages/1f/f2/f11dd73284122713f5f89fc940f370d035fa8e1e078d446b3313955157fe/pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:a668ce24de96165bb239160b3d854943128f4334822900534f2fe947930e5770", size = 2330317, upload-time = "2025-11-04T13:43:40.406Z" }, - { url = "https://files.pythonhosted.org/packages/88/9d/b06ca6acfe4abb296110fb1273a4d848a0bfb2ff65f3ee92127b3244e16b/pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f14f8f046c14563f8eb3f45f499cc658ab8d10072961e07225e507adb700e93f", size = 2316992, upload-time = "2025-11-04T13:43:43.602Z" }, - { url = "https://files.pythonhosted.org/packages/36/c7/cfc8e811f061c841d7990b0201912c3556bfeb99cdcb7ed24adc8d6f8704/pydantic_core-2.41.5-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:56121965f7a4dc965bff783d70b907ddf3d57f6eba29b6d2e5dabfaf07799c51", size = 2145302, upload-time = "2025-11-04T13:43:46.64Z" }, ] [[package]] @@ -1711,15 +1560,6 @@ version = "6.0.3" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f", size = 130960, upload-time = "2025-09-25T21:33:16.546Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/6d/16/a95b6757765b7b031c9374925bb718d55e0a9ba8a1b6a12d25962ea44347/pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e", size = 185826, upload-time = "2025-09-25T21:31:58.655Z" }, - { url = "https://files.pythonhosted.org/packages/16/19/13de8e4377ed53079ee996e1ab0a9c33ec2faf808a4647b7b4c0d46dd239/pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824", size = 175577, upload-time = "2025-09-25T21:32:00.088Z" }, - { url = "https://files.pythonhosted.org/packages/0c/62/d2eb46264d4b157dae1275b573017abec435397aa59cbcdab6fc978a8af4/pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c", size = 775556, upload-time = "2025-09-25T21:32:01.31Z" }, - { url = "https://files.pythonhosted.org/packages/10/cb/16c3f2cf3266edd25aaa00d6c4350381c8b012ed6f5276675b9eba8d9ff4/pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00", size = 882114, upload-time = "2025-09-25T21:32:03.376Z" }, - { url = "https://files.pythonhosted.org/packages/71/60/917329f640924b18ff085ab889a11c763e0b573da888e8404ff486657602/pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d", size = 806638, upload-time = "2025-09-25T21:32:04.553Z" }, - { url = "https://files.pythonhosted.org/packages/dd/6f/529b0f316a9fd167281a6c3826b5583e6192dba792dd55e3203d3f8e655a/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a", size = 767463, upload-time = "2025-09-25T21:32:06.152Z" }, - { url = "https://files.pythonhosted.org/packages/f2/6a/b627b4e0c1dd03718543519ffb2f1deea4a1e6d42fbab8021936a4d22589/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4", size = 794986, upload-time = "2025-09-25T21:32:07.367Z" }, - { url = "https://files.pythonhosted.org/packages/45/91/47a6e1c42d9ee337c4839208f30d9f09caa9f720ec7582917b264defc875/pyyaml-6.0.3-cp311-cp311-win32.whl", hash = "sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b", size = 142543, upload-time = "2025-09-25T21:32:08.95Z" }, - { url = "https://files.pythonhosted.org/packages/da/e3/ea007450a105ae919a72393cb06f122f288ef60bba2dc64b26e2646fa315/pyyaml-6.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf", size = 158763, upload-time = "2025-09-25T21:32:09.96Z" }, { url = "https://files.pythonhosted.org/packages/d1/33/422b98d2195232ca1826284a76852ad5a86fe23e31b009c9886b2d0fb8b2/pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196", size = 182063, upload-time = "2025-09-25T21:32:11.445Z" }, { url = "https://files.pythonhosted.org/packages/89/a0/6cf41a19a1f2f3feab0e9c0b74134aa2ce6849093d5517a0c550fe37a648/pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0", size = 173973, upload-time = "2025-09-25T21:32:12.492Z" }, { url = "https://files.pythonhosted.org/packages/ed/23/7a778b6bd0b9a8039df8b1b1d80e2e2ad78aa04171592c8a5c43a56a6af4/pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28", size = 775116, upload-time = "2025-09-25T21:32:13.652Z" }, @@ -1792,22 +1632,6 @@ version = "2026.2.28" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/8b/71/41455aa99a5a5ac1eaf311f5d8efd9ce6433c03ac1e0962de163350d0d97/regex-2026.2.28.tar.gz", hash = "sha256:a729e47d418ea11d03469f321aaf67cdee8954cde3ff2cf8403ab87951ad10f2", size = 415184, upload-time = "2026-02-28T02:19:42.792Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/04/db/8cbfd0ba3f302f2d09dd0019a9fcab74b63fee77a76c937d0e33161fb8c1/regex-2026.2.28-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:e621fb7c8dc147419b28e1702f58a0177ff8308a76fa295c71f3e7827849f5d9", size = 488462, upload-time = "2026-02-28T02:16:22.616Z" }, - { url = "https://files.pythonhosted.org/packages/5d/10/ccc22c52802223f2368731964ddd117799e1390ffc39dbb31634a83022ee/regex-2026.2.28-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0d5bef2031cbf38757a0b0bc4298bb4824b6332d28edc16b39247228fbdbad97", size = 290774, upload-time = "2026-02-28T02:16:23.993Z" }, - { url = "https://files.pythonhosted.org/packages/62/b9/6796b3bf3101e64117201aaa3a5a030ec677ecf34b3cd6141b5d5c6c67d5/regex-2026.2.28-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:bcb399ed84eabf4282587ba151f2732ad8168e66f1d3f85b1d038868fe547703", size = 288724, upload-time = "2026-02-28T02:16:25.403Z" }, - { url = "https://files.pythonhosted.org/packages/9c/02/291c0ae3f3a10cea941d0f5366da1843d8d1fa8a25b0671e20a0e454bb38/regex-2026.2.28-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7c1b34dfa72f826f535b20712afa9bb3ba580020e834f3c69866c5bddbf10098", size = 791924, upload-time = "2026-02-28T02:16:26.863Z" }, - { url = "https://files.pythonhosted.org/packages/0f/57/f0235cc520d9672742196c5c15098f8f703f2758d48d5a7465a56333e496/regex-2026.2.28-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:851fa70df44325e1e4cdb79c5e676e91a78147b1b543db2aec8734d2add30ec2", size = 860095, upload-time = "2026-02-28T02:16:28.772Z" }, - { url = "https://files.pythonhosted.org/packages/b3/7c/393c94cbedda79a0f5f2435ebd01644aba0b338d327eb24b4aa5b8d6c07f/regex-2026.2.28-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:516604edd17b1c2c3e579cf4e9b25a53bf8fa6e7cedddf1127804d3e0140ca64", size = 906583, upload-time = "2026-02-28T02:16:30.977Z" }, - { url = "https://files.pythonhosted.org/packages/2c/73/a72820f47ca5abf2b5d911d0407ba5178fc52cf9780191ed3a54f5f419a2/regex-2026.2.28-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e7ce83654d1ab701cb619285a18a8e5a889c1216d746ddc710c914ca5fd71022", size = 800234, upload-time = "2026-02-28T02:16:32.55Z" }, - { url = "https://files.pythonhosted.org/packages/34/b3/6e6a4b7b31fa998c4cf159a12cbeaf356386fbd1a8be743b1e80a3da51e4/regex-2026.2.28-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f2791948f7c70bb9335a9102df45e93d428f4b8128020d85920223925d73b9e1", size = 772803, upload-time = "2026-02-28T02:16:34.029Z" }, - { url = "https://files.pythonhosted.org/packages/10/e7/5da0280c765d5a92af5e1cd324b3fe8464303189cbaa449de9a71910e273/regex-2026.2.28-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:03a83cc26aa2acda6b8b9dfe748cf9e84cbd390c424a1de34fdcef58961a297a", size = 781117, upload-time = "2026-02-28T02:16:36.253Z" }, - { url = "https://files.pythonhosted.org/packages/76/39/0b8d7efb256ae34e1b8157acc1afd8758048a1cf0196e1aec2e71fd99f4b/regex-2026.2.28-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:ec6f5674c5dc836994f50f1186dd1fafde4be0666aae201ae2fcc3d29d8adf27", size = 854224, upload-time = "2026-02-28T02:16:38.119Z" }, - { url = "https://files.pythonhosted.org/packages/21/ff/a96d483ebe8fe6d1c67907729202313895d8de8495569ec319c6f29d0438/regex-2026.2.28-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:50c2fc924749543e0eacc93ada6aeeb3ea5f6715825624baa0dccaec771668ae", size = 761898, upload-time = "2026-02-28T02:16:40.333Z" }, - { url = "https://files.pythonhosted.org/packages/89/bd/d4f2e75cb4a54b484e796017e37c0d09d8a0a837de43d17e238adf163f4e/regex-2026.2.28-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:ba55c50f408fb5c346a3a02d2ce0ebc839784e24f7c9684fde328ff063c3cdea", size = 844832, upload-time = "2026-02-28T02:16:41.875Z" }, - { url = "https://files.pythonhosted.org/packages/8a/a7/428a135cf5e15e4e11d1e696eb2bf968362f8ea8a5f237122e96bc2ae950/regex-2026.2.28-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:edb1b1b3a5576c56f08ac46f108c40333f222ebfd5cf63afdfa3aab0791ebe5b", size = 788347, upload-time = "2026-02-28T02:16:43.472Z" }, - { url = "https://files.pythonhosted.org/packages/a9/59/68691428851cf9c9c3707217ab1d9b47cfeec9d153a49919e6c368b9e926/regex-2026.2.28-cp311-cp311-win32.whl", hash = "sha256:948c12ef30ecedb128903c2c2678b339746eb7c689c5c21957c4a23950c96d15", size = 266033, upload-time = "2026-02-28T02:16:45.094Z" }, - { url = "https://files.pythonhosted.org/packages/42/8b/1483de1c57024e89296cbcceb9cccb3f625d416ddb46e570be185c9b05a9/regex-2026.2.28-cp311-cp311-win_amd64.whl", hash = "sha256:fd63453f10d29097cc3dc62d070746523973fb5aa1c66d25f8558bebd47fed61", size = 277978, upload-time = "2026-02-28T02:16:46.75Z" }, - { url = "https://files.pythonhosted.org/packages/a4/36/abec45dc6e7252e3dbc797120496e43bb5730a7abf0d9cb69340696a2f2d/regex-2026.2.28-cp311-cp311-win_arm64.whl", hash = "sha256:00f2b8d9615aa165fdff0a13f1a92049bfad555ee91e20d246a51aa0b556c60a", size = 270340, upload-time = "2026-02-28T02:16:48.626Z" }, { url = "https://files.pythonhosted.org/packages/07/42/9061b03cf0fc4b5fa2c3984cbbaed54324377e440a5c5a29d29a72518d62/regex-2026.2.28-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:fcf26c3c6d0da98fada8ae4ef0aa1c3405a431c0a77eb17306d38a89b02adcd7", size = 489574, upload-time = "2026-02-28T02:16:50.455Z" }, { url = "https://files.pythonhosted.org/packages/77/83/0c8a5623a233015595e3da499c5a1c13720ac63c107897a6037bb97af248/regex-2026.2.28-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:02473c954af35dd2defeb07e44182f5705b30ea3f351a7cbffa9177beb14da5d", size = 291426, upload-time = "2026-02-28T02:16:52.52Z" }, { url = "https://files.pythonhosted.org/packages/9e/06/3ef1ac6910dc3295ebd71b1f9bfa737e82cfead211a18b319d45f85ddd09/regex-2026.2.28-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9b65d33a17101569f86d9c5966a8b1d7fbf8afdda5a8aa219301b0a80f58cf7d", size = 289200, upload-time = "2026-02-28T02:16:54.08Z" }, @@ -1936,21 +1760,6 @@ version = "0.30.0" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/20/af/3f2f423103f1113b36230496629986e0ef7e199d2aa8392452b484b38ced/rpds_py-0.30.0.tar.gz", hash = "sha256:dd8ff7cf90014af0c0f787eea34794ebf6415242ee1d6fa91eaba725cc441e84", size = 69469, upload-time = "2025-11-30T20:24:38.837Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/4d/6e/f964e88b3d2abee2a82c1ac8366da848fce1c6d834dc2132c3fda3970290/rpds_py-0.30.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:a2bffea6a4ca9f01b3f8e548302470306689684e61602aa3d141e34da06cf425", size = 370157, upload-time = "2025-11-30T20:21:53.789Z" }, - { url = "https://files.pythonhosted.org/packages/94/ba/24e5ebb7c1c82e74c4e4f33b2112a5573ddc703915b13a073737b59b86e0/rpds_py-0.30.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:dc4f992dfe1e2bc3ebc7444f6c7051b4bc13cd8e33e43511e8ffd13bf407010d", size = 359676, upload-time = "2025-11-30T20:21:55.475Z" }, - { url = "https://files.pythonhosted.org/packages/84/86/04dbba1b087227747d64d80c3b74df946b986c57af0a9f0c98726d4d7a3b/rpds_py-0.30.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:422c3cb9856d80b09d30d2eb255d0754b23e090034e1deb4083f8004bd0761e4", size = 389938, upload-time = "2025-11-30T20:21:57.079Z" }, - { url = "https://files.pythonhosted.org/packages/42/bb/1463f0b1722b7f45431bdd468301991d1328b16cffe0b1c2918eba2c4eee/rpds_py-0.30.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:07ae8a593e1c3c6b82ca3292efbe73c30b61332fd612e05abee07c79359f292f", size = 402932, upload-time = "2025-11-30T20:21:58.47Z" }, - { url = "https://files.pythonhosted.org/packages/99/ee/2520700a5c1f2d76631f948b0736cdf9b0acb25abd0ca8e889b5c62ac2e3/rpds_py-0.30.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:12f90dd7557b6bd57f40abe7747e81e0c0b119bef015ea7726e69fe550e394a4", size = 525830, upload-time = "2025-11-30T20:21:59.699Z" }, - { url = "https://files.pythonhosted.org/packages/e0/ad/bd0331f740f5705cc555a5e17fdf334671262160270962e69a2bdef3bf76/rpds_py-0.30.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:99b47d6ad9a6da00bec6aabe5a6279ecd3c06a329d4aa4771034a21e335c3a97", size = 412033, upload-time = "2025-11-30T20:22:00.991Z" }, - { url = "https://files.pythonhosted.org/packages/f8/1e/372195d326549bb51f0ba0f2ecb9874579906b97e08880e7a65c3bef1a99/rpds_py-0.30.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:33f559f3104504506a44bb666b93a33f5d33133765b0c216a5bf2f1e1503af89", size = 390828, upload-time = "2025-11-30T20:22:02.723Z" }, - { url = "https://files.pythonhosted.org/packages/ab/2b/d88bb33294e3e0c76bc8f351a3721212713629ffca1700fa94979cb3eae8/rpds_py-0.30.0-cp311-cp311-manylinux_2_31_riscv64.whl", hash = "sha256:946fe926af6e44f3697abbc305ea168c2c31d3e3ef1058cf68f379bf0335a78d", size = 404683, upload-time = "2025-11-30T20:22:04.367Z" }, - { url = "https://files.pythonhosted.org/packages/50/32/c759a8d42bcb5289c1fac697cd92f6fe01a018dd937e62ae77e0e7f15702/rpds_py-0.30.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:495aeca4b93d465efde585977365187149e75383ad2684f81519f504f5c13038", size = 421583, upload-time = "2025-11-30T20:22:05.814Z" }, - { url = "https://files.pythonhosted.org/packages/2b/81/e729761dbd55ddf5d84ec4ff1f47857f4374b0f19bdabfcf929164da3e24/rpds_py-0.30.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d9a0ca5da0386dee0655b4ccdf46119df60e0f10da268d04fe7cc87886872ba7", size = 572496, upload-time = "2025-11-30T20:22:07.713Z" }, - { url = "https://files.pythonhosted.org/packages/14/f6/69066a924c3557c9c30baa6ec3a0aa07526305684c6f86c696b08860726c/rpds_py-0.30.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8d6d1cc13664ec13c1b84241204ff3b12f9bb82464b8ad6e7a5d3486975c2eed", size = 598669, upload-time = "2025-11-30T20:22:09.312Z" }, - { url = "https://files.pythonhosted.org/packages/5f/48/905896b1eb8a05630d20333d1d8ffd162394127b74ce0b0784ae04498d32/rpds_py-0.30.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:3896fa1be39912cf0757753826bc8bdc8ca331a28a7c4ae46b7a21280b06bb85", size = 561011, upload-time = "2025-11-30T20:22:11.309Z" }, - { url = "https://files.pythonhosted.org/packages/22/16/cd3027c7e279d22e5eb431dd3c0fbc677bed58797fe7581e148f3f68818b/rpds_py-0.30.0-cp311-cp311-win32.whl", hash = "sha256:55f66022632205940f1827effeff17c4fa7ae1953d2b74a8581baaefb7d16f8c", size = 221406, upload-time = "2025-11-30T20:22:13.101Z" }, - { url = "https://files.pythonhosted.org/packages/fa/5b/e7b7aa136f28462b344e652ee010d4de26ee9fd16f1bfd5811f5153ccf89/rpds_py-0.30.0-cp311-cp311-win_amd64.whl", hash = "sha256:a51033ff701fca756439d641c0ad09a41d9242fa69121c7d8769604a0a629825", size = 236024, upload-time = "2025-11-30T20:22:14.853Z" }, - { url = "https://files.pythonhosted.org/packages/14/a6/364bba985e4c13658edb156640608f2c9e1d3ea3c81b27aa9d889fff0e31/rpds_py-0.30.0-cp311-cp311-win_arm64.whl", hash = "sha256:47b0ef6231c58f506ef0b74d44e330405caa8428e770fec25329ed2cb971a229", size = 229069, upload-time = "2025-11-30T20:22:16.577Z" }, { url = "https://files.pythonhosted.org/packages/03/e7/98a2f4ac921d82f33e03f3835f5bf3a4a40aa1bfdc57975e74a97b2b4bdd/rpds_py-0.30.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:a161f20d9a43006833cd7068375a94d035714d73a172b681d8881820600abfad", size = 375086, upload-time = "2025-11-30T20:22:17.93Z" }, { url = "https://files.pythonhosted.org/packages/4d/a1/bca7fd3d452b272e13335db8d6b0b3ecde0f90ad6f16f3328c6fb150c889/rpds_py-0.30.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6abc8880d9d036ecaafe709079969f56e876fcf107f7a8e9920ba6d5a3878d05", size = 359053, upload-time = "2025-11-30T20:22:19.297Z" }, { url = "https://files.pythonhosted.org/packages/65/1c/ae157e83a6357eceff62ba7e52113e3ec4834a84cfe07fa4b0757a7d105f/rpds_py-0.30.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ca28829ae5f5d569bb62a79512c842a03a12576375d5ece7d2cadf8abe96ec28", size = 390763, upload-time = "2025-11-30T20:22:21.661Z" }, @@ -2024,18 +1833,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/85/70/92482ccffb96f5441aab93e26c4d66489eb599efdcf96fad90c14bbfb976/rpds_py-0.30.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:dbd936cde57abfee19ab3213cf9c26be06d60750e60a8e4dd85d1ab12c8b1f40", size = 556030, upload-time = "2025-11-30T20:24:10.956Z" }, { url = "https://files.pythonhosted.org/packages/20/53/7c7e784abfa500a2b6b583b147ee4bb5a2b3747a9166bab52fec4b5b5e7d/rpds_py-0.30.0-cp314-cp314t-win32.whl", hash = "sha256:dc824125c72246d924f7f796b4f63c1e9dc810c7d9e2355864b3c3a73d59ade0", size = 211570, upload-time = "2025-11-30T20:24:12.735Z" }, { url = "https://files.pythonhosted.org/packages/d0/02/fa464cdfbe6b26e0600b62c528b72d8608f5cc49f96b8d6e38c95d60c676/rpds_py-0.30.0-cp314-cp314t-win_amd64.whl", hash = "sha256:27f4b0e92de5bfbc6f86e43959e6edd1425c33b5e69aab0984a72047f2bcf1e3", size = 226532, upload-time = "2025-11-30T20:24:14.634Z" }, - { url = "https://files.pythonhosted.org/packages/69/71/3f34339ee70521864411f8b6992e7ab13ac30d8e4e3309e07c7361767d91/rpds_py-0.30.0-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:c2262bdba0ad4fc6fb5545660673925c2d2a5d9e2e0fb603aad545427be0fc58", size = 372292, upload-time = "2025-11-30T20:24:16.537Z" }, - { url = "https://files.pythonhosted.org/packages/57/09/f183df9b8f2d66720d2ef71075c59f7e1b336bec7ee4c48f0a2b06857653/rpds_py-0.30.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:ee6af14263f25eedc3bb918a3c04245106a42dfd4f5c2285ea6f997b1fc3f89a", size = 362128, upload-time = "2025-11-30T20:24:18.086Z" }, - { url = "https://files.pythonhosted.org/packages/7a/68/5c2594e937253457342e078f0cc1ded3dd7b2ad59afdbf2d354869110a02/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3adbb8179ce342d235c31ab8ec511e66c73faa27a47e076ccc92421add53e2bb", size = 391542, upload-time = "2025-11-30T20:24:20.092Z" }, - { url = "https://files.pythonhosted.org/packages/49/5c/31ef1afd70b4b4fbdb2800249f34c57c64beb687495b10aec0365f53dfc4/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:250fa00e9543ac9b97ac258bd37367ff5256666122c2d0f2bc97577c60a1818c", size = 404004, upload-time = "2025-11-30T20:24:22.231Z" }, - { url = "https://files.pythonhosted.org/packages/e3/63/0cfbea38d05756f3440ce6534d51a491d26176ac045e2707adc99bb6e60a/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9854cf4f488b3d57b9aaeb105f06d78e5529d3145b1e4a41750167e8c213c6d3", size = 527063, upload-time = "2025-11-30T20:24:24.302Z" }, - { url = "https://files.pythonhosted.org/packages/42/e6/01e1f72a2456678b0f618fc9a1a13f882061690893c192fcad9f2926553a/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:993914b8e560023bc0a8bf742c5f303551992dcb85e247b1e5c7f4a7d145bda5", size = 413099, upload-time = "2025-11-30T20:24:25.916Z" }, - { url = "https://files.pythonhosted.org/packages/b8/25/8df56677f209003dcbb180765520c544525e3ef21ea72279c98b9aa7c7fb/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58edca431fb9b29950807e301826586e5bbf24163677732429770a697ffe6738", size = 392177, upload-time = "2025-11-30T20:24:27.834Z" }, - { url = "https://files.pythonhosted.org/packages/4a/b4/0a771378c5f16f8115f796d1f437950158679bcd2a7c68cf251cfb00ed5b/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_31_riscv64.whl", hash = "sha256:dea5b552272a944763b34394d04577cf0f9bd013207bc32323b5a89a53cf9c2f", size = 406015, upload-time = "2025-11-30T20:24:29.457Z" }, - { url = "https://files.pythonhosted.org/packages/36/d8/456dbba0af75049dc6f63ff295a2f92766b9d521fa00de67a2bd6427d57a/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ba3af48635eb83d03f6c9735dfb21785303e73d22ad03d489e88adae6eab8877", size = 423736, upload-time = "2025-11-30T20:24:31.22Z" }, - { url = "https://files.pythonhosted.org/packages/13/64/b4d76f227d5c45a7e0b796c674fd81b0a6c4fbd48dc29271857d8219571c/rpds_py-0.30.0-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:dff13836529b921e22f15cb099751209a60009731a68519630a24d61f0b1b30a", size = 573981, upload-time = "2025-11-30T20:24:32.934Z" }, - { url = "https://files.pythonhosted.org/packages/20/91/092bacadeda3edf92bf743cc96a7be133e13a39cdbfd7b5082e7ab638406/rpds_py-0.30.0-pp311-pypy311_pp73-musllinux_1_2_i686.whl", hash = "sha256:1b151685b23929ab7beec71080a8889d4d6d9fa9a983d213f07121205d48e2c4", size = 599782, upload-time = "2025-11-30T20:24:35.169Z" }, - { url = "https://files.pythonhosted.org/packages/d1/b7/b95708304cd49b7b6f82fdd039f1748b66ec2b21d6a45180910802f1abf1/rpds_py-0.30.0-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:ac37f9f516c51e5753f27dfdef11a88330f04de2d564be3991384b2f3535d02e", size = 562191, upload-time = "2025-11-30T20:24:36.853Z" }, ] [[package]] @@ -2190,13 +1987,6 @@ dependencies = [ ] sdist = { url = "https://files.pythonhosted.org/packages/7d/ab/4d017d0f76ec3171d469d80fc03dfbb4e48a4bcaddaa831b31d526f05edc/tiktoken-0.12.0.tar.gz", hash = "sha256:b18ba7ee2b093863978fcb14f74b3707cdc8d4d4d3836853ce7ec60772139931", size = 37806, upload-time = "2025-10-06T20:22:45.419Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/de/46/21ea696b21f1d6d1efec8639c204bdf20fde8bafb351e1355c72c5d7de52/tiktoken-0.12.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:6e227c7f96925003487c33b1b32265fad2fbcec2b7cf4817afb76d416f40f6bb", size = 1051565, upload-time = "2025-10-06T20:21:44.566Z" }, - { url = "https://files.pythonhosted.org/packages/c9/d9/35c5d2d9e22bb2a5f74ba48266fb56c63d76ae6f66e02feb628671c0283e/tiktoken-0.12.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c06cf0fcc24c2cb2adb5e185c7082a82cba29c17575e828518c2f11a01f445aa", size = 995284, upload-time = "2025-10-06T20:21:45.622Z" }, - { url = "https://files.pythonhosted.org/packages/01/84/961106c37b8e49b9fdcf33fe007bb3a8fdcc380c528b20cc7fbba80578b8/tiktoken-0.12.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:f18f249b041851954217e9fd8e5c00b024ab2315ffda5ed77665a05fa91f42dc", size = 1129201, upload-time = "2025-10-06T20:21:47.074Z" }, - { url = "https://files.pythonhosted.org/packages/6a/d0/3d9275198e067f8b65076a68894bb52fd253875f3644f0a321a720277b8a/tiktoken-0.12.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:47a5bc270b8c3db00bb46ece01ef34ad050e364b51d406b6f9730b64ac28eded", size = 1152444, upload-time = "2025-10-06T20:21:48.139Z" }, - { url = "https://files.pythonhosted.org/packages/78/db/a58e09687c1698a7c592e1038e01c206569b86a0377828d51635561f8ebf/tiktoken-0.12.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:508fa71810c0efdcd1b898fda574889ee62852989f7c1667414736bcb2b9a4bd", size = 1195080, upload-time = "2025-10-06T20:21:49.246Z" }, - { url = "https://files.pythonhosted.org/packages/9e/1b/a9e4d2bf91d515c0f74afc526fd773a812232dd6cda33ebea7f531202325/tiktoken-0.12.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:a1af81a6c44f008cba48494089dd98cccb8b313f55e961a52f5b222d1e507967", size = 1255240, upload-time = "2025-10-06T20:21:50.274Z" }, - { url = "https://files.pythonhosted.org/packages/9d/15/963819345f1b1fb0809070a79e9dd96938d4ca41297367d471733e79c76c/tiktoken-0.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:3e68e3e593637b53e56f7237be560f7a394451cb8c11079755e80ae64b9e6def", size = 879422, upload-time = "2025-10-06T20:21:51.734Z" }, { url = "https://files.pythonhosted.org/packages/a4/85/be65d39d6b647c79800fd9d29241d081d4eeb06271f383bb87200d74cf76/tiktoken-0.12.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:b97f74aca0d78a1ff21b8cd9e9925714c15a9236d6ceacf5c7327c117e6e21e8", size = 1050728, upload-time = "2025-10-06T20:21:52.756Z" }, { url = "https://files.pythonhosted.org/packages/4a/42/6573e9129bc55c9bf7300b3a35bef2c6b9117018acca0dc760ac2d93dffe/tiktoken-0.12.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2b90f5ad190a4bb7c3eb30c5fa32e1e182ca1ca79f05e49b448438c3e225a49b", size = 994049, upload-time = "2025-10-06T20:21:53.782Z" }, { url = "https://files.pythonhosted.org/packages/66/c5/ed88504d2f4a5fd6856990b230b56d85a777feab84e6129af0822f5d0f70/tiktoken-0.12.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:65b26c7a780e2139e73acc193e5c63ac754021f160df919add909c1492c0fb37", size = 1129008, upload-time = "2025-10-06T20:21:54.832Z" }, @@ -2372,13 +2162,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/65/36/2d24b2cbe78547c6532da33fb8613debd3126eccc33a6374ab788f5e46e9/uuid_utils-0.14.1-cp39-abi3-win32.whl", hash = "sha256:b54d6aa6252d96bac1fdbc80d26ba71bad9f220b2724d692ad2f2310c22ef523", size = 183476, upload-time = "2026-02-20T22:50:32.745Z" }, { url = "https://files.pythonhosted.org/packages/83/92/2d7e90df8b1a69ec4cff33243ce02b7a62f926ef9e2f0eca5a026889cd73/uuid_utils-0.14.1-cp39-abi3-win_amd64.whl", hash = "sha256:fc27638c2ce267a0ce3e06828aff786f91367f093c80625ee21dad0208e0f5ba", size = 187147, upload-time = "2026-02-20T22:50:45.807Z" }, { url = "https://files.pythonhosted.org/packages/d9/26/529f4beee17e5248e37e0bc17a2761d34c0fa3b1e5729c88adb2065bae6e/uuid_utils-0.14.1-cp39-abi3-win_arm64.whl", hash = "sha256:b04cb49b42afbc4ff8dbc60cf054930afc479d6f4dd7f1ec3bbe5dbfdde06b7a", size = 188132, upload-time = "2026-02-20T22:50:41.718Z" }, - { url = "https://files.pythonhosted.org/packages/91/f9/6c64bdbf71f58ccde7919e00491812556f446a5291573af92c49a5e9aaef/uuid_utils-0.14.1-pp311-pypy311_pp73-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:b197cd5424cf89fb019ca7f53641d05bfe34b1879614bed111c9c313b5574cd8", size = 591617, upload-time = "2026-02-20T22:50:24.532Z" }, - { url = "https://files.pythonhosted.org/packages/d0/f0/758c3b0fb0c4871c7704fef26a5bc861de4f8a68e4831669883bebe07b0f/uuid_utils-0.14.1-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:12c65020ba6cb6abe1d57fcbfc2d0ea0506c67049ee031714057f5caf0f9bc9c", size = 303702, upload-time = "2026-02-20T22:50:40.687Z" }, - { url = "https://files.pythonhosted.org/packages/85/89/d91862b544c695cd58855efe3201f83894ed82fffe34500774238ab8eba7/uuid_utils-0.14.1-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b5d2ad28063d422ccc2c28d46471d47b61a58de885d35113a8f18cb547e25bf", size = 337678, upload-time = "2026-02-20T22:50:39.768Z" }, - { url = "https://files.pythonhosted.org/packages/ee/6b/cf342ba8a898f1de024be0243fac67c025cad530c79ea7f89c4ce718891a/uuid_utils-0.14.1-pp311-pypy311_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:da2234387b45fde40b0fedfee64a0ba591caeea9c48c7698ab6e2d85c7991533", size = 343711, upload-time = "2026-02-20T22:50:43.965Z" }, - { url = "https://files.pythonhosted.org/packages/b3/20/049418d094d396dfa6606b30af925cc68a6670c3b9103b23e6990f84b589/uuid_utils-0.14.1-pp311-pypy311_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:50fffc2827348c1e48972eed3d1c698959e63f9d030aa5dd82ba451113158a62", size = 476731, upload-time = "2026-02-20T22:50:30.589Z" }, - { url = "https://files.pythonhosted.org/packages/77/a1/0857f64d53a90321e6a46a3d4cc394f50e1366132dcd2ae147f9326ca98b/uuid_utils-0.14.1-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c1dbe718765f70f5b7f9b7f66b6a937802941b1cc56bcf642ce0274169741e01", size = 338902, upload-time = "2026-02-20T22:50:33.927Z" }, - { url = "https://files.pythonhosted.org/packages/ed/d0/5bf7cbf1ac138c92b9ac21066d18faf4d7e7f651047b700eb192ca4b9fdb/uuid_utils-0.14.1-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:258186964039a8e36db10810c1ece879d229b01331e09e9030bc5dcabe231bd2", size = 364700, upload-time = "2026-02-20T22:50:21.732Z" }, ] [[package]] @@ -2411,12 +2194,6 @@ version = "0.22.1" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/06/f0/18d39dbd1971d6d62c4629cc7fa67f74821b0dc1f5a77af43719de7936a7/uvloop-0.22.1.tar.gz", hash = "sha256:6c84bae345b9147082b17371e3dd5d42775bddce91f885499017f4607fdaf39f", size = 2443250, upload-time = "2025-10-16T22:17:19.342Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/c7/d5/69900f7883235562f1f50d8184bb7dd84a2fb61e9ec63f3782546fdbd057/uvloop-0.22.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:c60ebcd36f7b240b30788554b6f0782454826a0ed765d8430652621b5de674b9", size = 1352420, upload-time = "2025-10-16T22:16:21.187Z" }, - { url = "https://files.pythonhosted.org/packages/a8/73/c4e271b3bce59724e291465cc936c37758886a4868787da0278b3b56b905/uvloop-0.22.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3b7f102bf3cb1995cfeaee9321105e8f5da76fdb104cdad8986f85461a1b7b77", size = 748677, upload-time = "2025-10-16T22:16:22.558Z" }, - { url = "https://files.pythonhosted.org/packages/86/94/9fb7fad2f824d25f8ecac0d70b94d0d48107ad5ece03769a9c543444f78a/uvloop-0.22.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:53c85520781d84a4b8b230e24a5af5b0778efdb39142b424990ff1ef7c48ba21", size = 3753819, upload-time = "2025-10-16T22:16:23.903Z" }, - { url = "https://files.pythonhosted.org/packages/74/4f/256aca690709e9b008b7108bc85fba619a2bc37c6d80743d18abad16ee09/uvloop-0.22.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:56a2d1fae65fd82197cb8c53c367310b3eabe1bbb9fb5a04d28e3e3520e4f702", size = 3804529, upload-time = "2025-10-16T22:16:25.246Z" }, - { url = "https://files.pythonhosted.org/packages/7f/74/03c05ae4737e871923d21a76fe28b6aad57f5c03b6e6bfcfa5ad616013e4/uvloop-0.22.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:40631b049d5972c6755b06d0bfe8233b1bd9a8a6392d9d1c45c10b6f9e9b2733", size = 3621267, upload-time = "2025-10-16T22:16:26.819Z" }, - { url = "https://files.pythonhosted.org/packages/75/be/f8e590fe61d18b4a92070905497aec4c0e64ae1761498cad09023f3f4b3e/uvloop-0.22.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:535cc37b3a04f6cd2c1ef65fa1d370c9a35b6695df735fcff5427323f2cd5473", size = 3723105, upload-time = "2025-10-16T22:16:28.252Z" }, { url = "https://files.pythonhosted.org/packages/3d/ff/7f72e8170be527b4977b033239a83a68d5c881cc4775fca255c677f7ac5d/uvloop-0.22.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:fe94b4564e865d968414598eea1a6de60adba0c040ba4ed05ac1300de402cd42", size = 1359936, upload-time = "2025-10-16T22:16:29.436Z" }, { url = "https://files.pythonhosted.org/packages/c3/c6/e5d433f88fd54d81ef4be58b2b7b0cea13c442454a1db703a1eea0db1a59/uvloop-0.22.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:51eb9bd88391483410daad430813d982010f9c9c89512321f5b60e2cddbdddd6", size = 752769, upload-time = "2025-10-16T22:16:30.493Z" }, { url = "https://files.pythonhosted.org/packages/24/68/a6ac446820273e71aa762fa21cdcc09861edd3536ff47c5cd3b7afb10eeb/uvloop-0.22.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:700e674a166ca5778255e0e1dc4e9d79ab2acc57b9171b79e65feba7184b3370", size = 4317413, upload-time = "2025-10-16T22:16:31.644Z" }, @@ -2470,19 +2247,6 @@ dependencies = [ ] sdist = { url = "https://files.pythonhosted.org/packages/c2/c9/8869df9b2a2d6c59d79220a4db37679e74f807c559ffe5265e08b227a210/watchfiles-1.1.1.tar.gz", hash = "sha256:a173cb5c16c4f40ab19cecf48a534c409f7ea983ab8fed0741304a1c0a31b3f2", size = 94440, upload-time = "2025-10-14T15:06:21.08Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/1f/f8/2c5f479fb531ce2f0564eda479faecf253d886b1ab3630a39b7bf7362d46/watchfiles-1.1.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:f57b396167a2565a4e8b5e56a5a1c537571733992b226f4f1197d79e94cf0ae5", size = 406529, upload-time = "2025-10-14T15:04:32.899Z" }, - { url = "https://files.pythonhosted.org/packages/fe/cd/f515660b1f32f65df671ddf6f85bfaca621aee177712874dc30a97397977/watchfiles-1.1.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:421e29339983e1bebc281fab40d812742268ad057db4aee8c4d2bce0af43b741", size = 394384, upload-time = "2025-10-14T15:04:33.761Z" }, - { url = "https://files.pythonhosted.org/packages/7b/c3/28b7dc99733eab43fca2d10f55c86e03bd6ab11ca31b802abac26b23d161/watchfiles-1.1.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6e43d39a741e972bab5d8100b5cdacf69db64e34eb19b6e9af162bccf63c5cc6", size = 448789, upload-time = "2025-10-14T15:04:34.679Z" }, - { url = "https://files.pythonhosted.org/packages/4a/24/33e71113b320030011c8e4316ccca04194bf0cbbaeee207f00cbc7d6b9f5/watchfiles-1.1.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f537afb3276d12814082a2e9b242bdcf416c2e8fd9f799a737990a1dbe906e5b", size = 460521, upload-time = "2025-10-14T15:04:35.963Z" }, - { url = "https://files.pythonhosted.org/packages/f4/c3/3c9a55f255aa57b91579ae9e98c88704955fa9dac3e5614fb378291155df/watchfiles-1.1.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b2cd9e04277e756a2e2d2543d65d1e2166d6fd4c9b183f8808634fda23f17b14", size = 488722, upload-time = "2025-10-14T15:04:37.091Z" }, - { url = "https://files.pythonhosted.org/packages/49/36/506447b73eb46c120169dc1717fe2eff07c234bb3232a7200b5f5bd816e9/watchfiles-1.1.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5f3f58818dc0b07f7d9aa7fe9eb1037aecb9700e63e1f6acfed13e9fef648f5d", size = 596088, upload-time = "2025-10-14T15:04:38.39Z" }, - { url = "https://files.pythonhosted.org/packages/82/ab/5f39e752a9838ec4d52e9b87c1e80f1ee3ccdbe92e183c15b6577ab9de16/watchfiles-1.1.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9bb9f66367023ae783551042d31b1d7fd422e8289eedd91f26754a66f44d5cff", size = 472923, upload-time = "2025-10-14T15:04:39.666Z" }, - { url = "https://files.pythonhosted.org/packages/af/b9/a419292f05e302dea372fa7e6fda5178a92998411f8581b9830d28fb9edb/watchfiles-1.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aebfd0861a83e6c3d1110b78ad54704486555246e542be3e2bb94195eabb2606", size = 456080, upload-time = "2025-10-14T15:04:40.643Z" }, - { url = "https://files.pythonhosted.org/packages/b0/c3/d5932fd62bde1a30c36e10c409dc5d54506726f08cb3e1d8d0ba5e2bc8db/watchfiles-1.1.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:5fac835b4ab3c6487b5dbad78c4b3724e26bcc468e886f8ba8cc4306f68f6701", size = 629432, upload-time = "2025-10-14T15:04:41.789Z" }, - { url = "https://files.pythonhosted.org/packages/f7/77/16bddd9779fafb795f1a94319dc965209c5641db5bf1edbbccace6d1b3c0/watchfiles-1.1.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:399600947b170270e80134ac854e21b3ccdefa11a9529a3decc1327088180f10", size = 623046, upload-time = "2025-10-14T15:04:42.718Z" }, - { url = "https://files.pythonhosted.org/packages/46/ef/f2ecb9a0f342b4bfad13a2787155c6ee7ce792140eac63a34676a2feeef2/watchfiles-1.1.1-cp311-cp311-win32.whl", hash = "sha256:de6da501c883f58ad50db3a32ad397b09ad29865b5f26f64c24d3e3281685849", size = 271473, upload-time = "2025-10-14T15:04:43.624Z" }, - { url = "https://files.pythonhosted.org/packages/94/bc/f42d71125f19731ea435c3948cad148d31a64fccde3867e5ba4edee901f9/watchfiles-1.1.1-cp311-cp311-win_amd64.whl", hash = "sha256:35c53bd62a0b885bf653ebf6b700d1bf05debb78ad9292cf2a942b23513dc4c4", size = 287598, upload-time = "2025-10-14T15:04:44.516Z" }, - { url = "https://files.pythonhosted.org/packages/57/c9/a30f897351f95bbbfb6abcadafbaca711ce1162f4db95fc908c98a9165f3/watchfiles-1.1.1-cp311-cp311-win_arm64.whl", hash = "sha256:57ca5281a8b5e27593cb7d82c2ac927ad88a96ed406aa446f6344e4328208e9e", size = 277210, upload-time = "2025-10-14T15:04:45.883Z" }, { url = "https://files.pythonhosted.org/packages/74/d5/f039e7e3c639d9b1d09b07ea412a6806d38123f0508e5f9b48a87b0a76cc/watchfiles-1.1.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:8c89f9f2f740a6b7dcc753140dd5e1ab9215966f7a3530d0c0705c83b401bd7d", size = 404745, upload-time = "2025-10-14T15:04:46.731Z" }, { url = "https://files.pythonhosted.org/packages/a5/96/a881a13aa1349827490dab2d363c8039527060cfcc2c92cc6d13d1b1049e/watchfiles-1.1.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:bd404be08018c37350f0d6e34676bd1e2889990117a2b90070b3007f172d0610", size = 391769, upload-time = "2025-10-14T15:04:48.003Z" }, { url = "https://files.pythonhosted.org/packages/4b/5b/d3b460364aeb8da471c1989238ea0e56bec24b6042a68046adf3d9ddb01c/watchfiles-1.1.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8526e8f916bb5b9a0a777c8317c23ce65de259422bba5b31325a6fa6029d33af", size = 449374, upload-time = "2025-10-14T15:04:49.179Z" }, @@ -2542,10 +2306,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/4f/55/2af26693fd15165c4ff7857e38330e1b61ab8c37d15dc79118cdba115b7a/watchfiles-1.1.1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8c91ed27800188c2ae96d16e3149f199d62f86c7af5f5f4d2c61a3ed8cd3666c", size = 455072, upload-time = "2025-10-14T15:05:48.928Z" }, { url = "https://files.pythonhosted.org/packages/66/1d/d0d200b10c9311ec25d2273f8aad8c3ef7cc7ea11808022501811208a750/watchfiles-1.1.1-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:311ff15a0bae3714ffb603e6ba6dbfba4065ab60865d15a6ec544133bdb21099", size = 629104, upload-time = "2025-10-14T15:05:49.908Z" }, { url = "https://files.pythonhosted.org/packages/e3/bd/fa9bb053192491b3867ba07d2343d9f2252e00811567d30ae8d0f78136fe/watchfiles-1.1.1-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:a916a2932da8f8ab582f242c065f5c81bed3462849ca79ee357dd9551b0e9b01", size = 622112, upload-time = "2025-10-14T15:05:50.941Z" }, - { url = "https://files.pythonhosted.org/packages/d3/8e/e500f8b0b77be4ff753ac94dc06b33d8f0d839377fee1b78e8c8d8f031bf/watchfiles-1.1.1-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:db476ab59b6765134de1d4fe96a1a9c96ddf091683599be0f26147ea1b2e4b88", size = 408250, upload-time = "2025-10-14T15:06:10.264Z" }, - { url = "https://files.pythonhosted.org/packages/bd/95/615e72cd27b85b61eec764a5ca51bd94d40b5adea5ff47567d9ebc4d275a/watchfiles-1.1.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:89eef07eee5e9d1fda06e38822ad167a044153457e6fd997f8a858ab7564a336", size = 396117, upload-time = "2025-10-14T15:06:11.28Z" }, - { url = "https://files.pythonhosted.org/packages/c9/81/e7fe958ce8a7fb5c73cc9fb07f5aeaf755e6aa72498c57d760af760c91f8/watchfiles-1.1.1-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ce19e06cbda693e9e7686358af9cd6f5d61312ab8b00488bc36f5aabbaf77e24", size = 450493, upload-time = "2025-10-14T15:06:12.321Z" }, - { url = "https://files.pythonhosted.org/packages/6e/d4/ed38dd3b1767193de971e694aa544356e63353c33a85d948166b5ff58b9e/watchfiles-1.1.1-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3e6f39af2eab0118338902798b5aa6664f46ff66bc0280de76fca67a7f262a49", size = 457546, upload-time = "2025-10-14T15:06:13.372Z" }, ] [[package]] @@ -2554,15 +2314,6 @@ version = "16.0" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/04/24/4b2031d72e840ce4c1ccb255f693b15c334757fc50023e4db9537080b8c4/websockets-16.0.tar.gz", hash = "sha256:5f6261a5e56e8d5c42a4497b364ea24d94d9563e8fbd44e78ac40879c60179b5", size = 179346, upload-time = "2026-01-10T09:23:47.181Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/f2/db/de907251b4ff46ae804ad0409809504153b3f30984daf82a1d84a9875830/websockets-16.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:31a52addea25187bde0797a97d6fc3d2f92b6f72a9370792d65a6e84615ac8a8", size = 177340, upload-time = "2026-01-10T09:22:34.539Z" }, - { url = "https://files.pythonhosted.org/packages/f3/fa/abe89019d8d8815c8781e90d697dec52523fb8ebe308bf11664e8de1877e/websockets-16.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:417b28978cdccab24f46400586d128366313e8a96312e4b9362a4af504f3bbad", size = 175022, upload-time = "2026-01-10T09:22:36.332Z" }, - { url = "https://files.pythonhosted.org/packages/58/5d/88ea17ed1ded2079358b40d31d48abe90a73c9e5819dbcde1606e991e2ad/websockets-16.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:af80d74d4edfa3cb9ed973a0a5ba2b2a549371f8a741e0800cb07becdd20f23d", size = 175319, upload-time = "2026-01-10T09:22:37.602Z" }, - { url = "https://files.pythonhosted.org/packages/d2/ae/0ee92b33087a33632f37a635e11e1d99d429d3d323329675a6022312aac2/websockets-16.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:08d7af67b64d29823fed316505a89b86705f2b7981c07848fb5e3ea3020c1abe", size = 184631, upload-time = "2026-01-10T09:22:38.789Z" }, - { url = "https://files.pythonhosted.org/packages/c8/c5/27178df583b6c5b31b29f526ba2da5e2f864ecc79c99dae630a85d68c304/websockets-16.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7be95cfb0a4dae143eaed2bcba8ac23f4892d8971311f1b06f3c6b78952ee70b", size = 185870, upload-time = "2026-01-10T09:22:39.893Z" }, - { url = "https://files.pythonhosted.org/packages/87/05/536652aa84ddc1c018dbb7e2c4cbcd0db884580bf8e95aece7593fde526f/websockets-16.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d6297ce39ce5c2e6feb13c1a996a2ded3b6832155fcfc920265c76f24c7cceb5", size = 185361, upload-time = "2026-01-10T09:22:41.016Z" }, - { url = "https://files.pythonhosted.org/packages/6d/e2/d5332c90da12b1e01f06fb1b85c50cfc489783076547415bf9f0a659ec19/websockets-16.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1c1b30e4f497b0b354057f3467f56244c603a79c0d1dafce1d16c283c25f6e64", size = 184615, upload-time = "2026-01-10T09:22:42.442Z" }, - { url = "https://files.pythonhosted.org/packages/77/fb/d3f9576691cae9253b51555f841bc6600bf0a983a461c79500ace5a5b364/websockets-16.0-cp311-cp311-win32.whl", hash = "sha256:5f451484aeb5cafee1ccf789b1b66f535409d038c56966d6101740c1614b86c6", size = 178246, upload-time = "2026-01-10T09:22:43.654Z" }, - { url = "https://files.pythonhosted.org/packages/54/67/eaff76b3dbaf18dcddabc3b8c1dba50b483761cccff67793897945b37408/websockets-16.0-cp311-cp311-win_amd64.whl", hash = "sha256:8d7f0659570eefb578dacde98e24fb60af35350193e4f56e11190787bee77dac", size = 178684, upload-time = "2026-01-10T09:22:44.941Z" }, { url = "https://files.pythonhosted.org/packages/84/7b/bac442e6b96c9d25092695578dda82403c77936104b5682307bd4deb1ad4/websockets-16.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:71c989cbf3254fbd5e84d3bff31e4da39c43f884e64f2551d14bb3c186230f00", size = 177365, upload-time = "2026-01-10T09:22:46.787Z" }, { url = "https://files.pythonhosted.org/packages/b0/fe/136ccece61bd690d9c1f715baaeefd953bb2360134de73519d5df19d29ca/websockets-16.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:8b6e209ffee39ff1b6d0fa7bfef6de950c60dfb91b8fcead17da4ee539121a79", size = 175038, upload-time = "2026-01-10T09:22:47.999Z" }, { url = "https://files.pythonhosted.org/packages/40/1e/9771421ac2286eaab95b8575b0cb701ae3663abf8b5e1f64f1fd90d0a673/websockets-16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:86890e837d61574c92a97496d590968b23c2ef0aeb8a9bc9421d174cd378ae39", size = 175328, upload-time = "2026-01-10T09:22:49.809Z" }, @@ -2599,11 +2350,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/88/a8/a080593f89b0138b6cba1b28f8df5673b5506f72879322288b031337c0b8/websockets-16.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:32da954ffa2814258030e5a57bc73a3635463238e797c7375dc8091327434206", size = 185356, upload-time = "2026-01-10T09:23:32.627Z" }, { url = "https://files.pythonhosted.org/packages/c2/b6/b9afed2afadddaf5ebb2afa801abf4b0868f42f8539bfe4b071b5266c9fe/websockets-16.0-cp314-cp314t-win32.whl", hash = "sha256:5a4b4cc550cb665dd8a47f868c8d04c8230f857363ad3c9caf7a0c3bf8c61ca6", size = 178085, upload-time = "2026-01-10T09:23:33.816Z" }, { url = "https://files.pythonhosted.org/packages/9f/3e/28135a24e384493fa804216b79a6a6759a38cc4ff59118787b9fb693df93/websockets-16.0-cp314-cp314t-win_amd64.whl", hash = "sha256:b14dc141ed6d2dde437cddb216004bcac6a1df0935d79656387bd41632ba0bbd", size = 178531, upload-time = "2026-01-10T09:23:35.016Z" }, - { url = "https://files.pythonhosted.org/packages/72/07/c98a68571dcf256e74f1f816b8cc5eae6eb2d3d5cfa44d37f801619d9166/websockets-16.0-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:349f83cd6c9a415428ee1005cadb5c2c56f4389bc06a9af16103c3bc3dcc8b7d", size = 174947, upload-time = "2026-01-10T09:23:36.166Z" }, - { url = "https://files.pythonhosted.org/packages/7e/52/93e166a81e0305b33fe416338be92ae863563fe7bce446b0f687b9df5aea/websockets-16.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:4a1aba3340a8dca8db6eb5a7986157f52eb9e436b74813764241981ca4888f03", size = 175260, upload-time = "2026-01-10T09:23:37.409Z" }, - { url = "https://files.pythonhosted.org/packages/56/0c/2dbf513bafd24889d33de2ff0368190a0e69f37bcfa19009ef819fe4d507/websockets-16.0-pp311-pypy311_pp73-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:f4a32d1bd841d4bcbffdcb3d2ce50c09c3909fbead375ab28d0181af89fd04da", size = 176071, upload-time = "2026-01-10T09:23:39.158Z" }, - { url = "https://files.pythonhosted.org/packages/a5/8f/aea9c71cc92bf9b6cc0f7f70df8f0b420636b6c96ef4feee1e16f80f75dd/websockets-16.0-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0298d07ee155e2e9fda5be8a9042200dd2e3bb0b8a38482156576f863a9d457c", size = 176968, upload-time = "2026-01-10T09:23:41.031Z" }, - { url = "https://files.pythonhosted.org/packages/9a/3f/f70e03f40ffc9a30d817eef7da1be72ee4956ba8d7255c399a01b135902a/websockets-16.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:a653aea902e0324b52f1613332ddf50b00c06fdaf7e92624fbf8c77c78fa5767", size = 178735, upload-time = "2026-01-10T09:23:42.259Z" }, { url = "https://files.pythonhosted.org/packages/6f/28/258ebab549c2bf3e64d2b0217b973467394a9cea8c42f70418ca2c5d0d2e/websockets-16.0-py3-none-any.whl", hash = "sha256:1637db62fad1dc833276dded54215f2c7fa46912301a24bd94d45d46a011ceec", size = 171598, upload-time = "2026-01-10T09:23:45.395Z" }, ] @@ -2613,21 +2359,6 @@ version = "3.6.0" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/02/84/30869e01909fb37a6cc7e18688ee8bf1e42d57e7e0777636bd47524c43c7/xxhash-3.6.0.tar.gz", hash = "sha256:f0162a78b13a0d7617b2845b90c763339d1f1d82bb04a4b07f4ab535cc5e05d6", size = 85160, upload-time = "2025-10-02T14:37:08.097Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/17/d4/cc2f0400e9154df4b9964249da78ebd72f318e35ccc425e9f403c392f22a/xxhash-3.6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b47bbd8cf2d72797f3c2772eaaac0ded3d3af26481a26d7d7d41dc2d3c46b04a", size = 32844, upload-time = "2025-10-02T14:34:14.037Z" }, - { url = "https://files.pythonhosted.org/packages/5e/ec/1cc11cd13e26ea8bc3cb4af4eaadd8d46d5014aebb67be3f71fb0b68802a/xxhash-3.6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2b6821e94346f96db75abaa6e255706fb06ebd530899ed76d32cd99f20dc52fa", size = 30809, upload-time = "2025-10-02T14:34:15.484Z" }, - { url = "https://files.pythonhosted.org/packages/04/5f/19fe357ea348d98ca22f456f75a30ac0916b51c753e1f8b2e0e6fb884cce/xxhash-3.6.0-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:d0a9751f71a1a65ce3584e9cae4467651c7e70c9d31017fa57574583a4540248", size = 194665, upload-time = "2025-10-02T14:34:16.541Z" }, - { url = "https://files.pythonhosted.org/packages/90/3b/d1f1a8f5442a5fd8beedae110c5af7604dc37349a8e16519c13c19a9a2de/xxhash-3.6.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8b29ee68625ab37b04c0b40c3fafdf24d2f75ccd778333cfb698f65f6c463f62", size = 213550, upload-time = "2025-10-02T14:34:17.878Z" }, - { url = "https://files.pythonhosted.org/packages/c4/ef/3a9b05eb527457d5db13a135a2ae1a26c80fecd624d20f3e8dcc4cb170f3/xxhash-3.6.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:6812c25fe0d6c36a46ccb002f40f27ac903bf18af9f6dd8f9669cb4d176ab18f", size = 212384, upload-time = "2025-10-02T14:34:19.182Z" }, - { url = "https://files.pythonhosted.org/packages/0f/18/ccc194ee698c6c623acbf0f8c2969811a8a4b6185af5e824cd27b9e4fd3e/xxhash-3.6.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4ccbff013972390b51a18ef1255ef5ac125c92dc9143b2d1909f59abc765540e", size = 445749, upload-time = "2025-10-02T14:34:20.659Z" }, - { url = "https://files.pythonhosted.org/packages/a5/86/cf2c0321dc3940a7aa73076f4fd677a0fb3e405cb297ead7d864fd90847e/xxhash-3.6.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:297b7fbf86c82c550e12e8fb71968b3f033d27b874276ba3624ea868c11165a8", size = 193880, upload-time = "2025-10-02T14:34:22.431Z" }, - { url = "https://files.pythonhosted.org/packages/82/fb/96213c8560e6f948a1ecc9a7613f8032b19ee45f747f4fca4eb31bb6d6ed/xxhash-3.6.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:dea26ae1eb293db089798d3973a5fc928a18fdd97cc8801226fae705b02b14b0", size = 210912, upload-time = "2025-10-02T14:34:23.937Z" }, - { url = "https://files.pythonhosted.org/packages/40/aa/4395e669b0606a096d6788f40dbdf2b819d6773aa290c19e6e83cbfc312f/xxhash-3.6.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:7a0b169aafb98f4284f73635a8e93f0735f9cbde17bd5ec332480484241aaa77", size = 198654, upload-time = "2025-10-02T14:34:25.644Z" }, - { url = "https://files.pythonhosted.org/packages/67/74/b044fcd6b3d89e9b1b665924d85d3f400636c23590226feb1eb09e1176ce/xxhash-3.6.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:08d45aef063a4531b785cd72de4887766d01dc8f362a515693df349fdb825e0c", size = 210867, upload-time = "2025-10-02T14:34:27.203Z" }, - { url = "https://files.pythonhosted.org/packages/bc/fd/3ce73bf753b08cb19daee1eb14aa0d7fe331f8da9c02dd95316ddfe5275e/xxhash-3.6.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:929142361a48ee07f09121fe9e96a84950e8d4df3bb298ca5d88061969f34d7b", size = 414012, upload-time = "2025-10-02T14:34:28.409Z" }, - { url = "https://files.pythonhosted.org/packages/ba/b3/5a4241309217c5c876f156b10778f3ab3af7ba7e3259e6d5f5c7d0129eb2/xxhash-3.6.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:51312c768403d8540487dbbfb557454cfc55589bbde6424456951f7fcd4facb3", size = 191409, upload-time = "2025-10-02T14:34:29.696Z" }, - { url = "https://files.pythonhosted.org/packages/c0/01/99bfbc15fb9abb9a72b088c1d95219fc4782b7d01fc835bd5744d66dd0b8/xxhash-3.6.0-cp311-cp311-win32.whl", hash = "sha256:d1927a69feddc24c987b337ce81ac15c4720955b667fe9b588e02254b80446fd", size = 30574, upload-time = "2025-10-02T14:34:31.028Z" }, - { url = "https://files.pythonhosted.org/packages/65/79/9d24d7f53819fe301b231044ea362ce64e86c74f6e8c8e51320de248b3e5/xxhash-3.6.0-cp311-cp311-win_amd64.whl", hash = "sha256:26734cdc2d4ffe449b41d186bbeac416f704a482ed835d375a5c0cb02bc63fef", size = 31481, upload-time = "2025-10-02T14:34:32.062Z" }, - { url = "https://files.pythonhosted.org/packages/30/4e/15cd0e3e8772071344eab2961ce83f6e485111fed8beb491a3f1ce100270/xxhash-3.6.0-cp311-cp311-win_arm64.whl", hash = "sha256:d72f67ef8bf36e05f5b6c65e8524f265bd61071471cd4cf1d36743ebeeeb06b7", size = 27861, upload-time = "2025-10-02T14:34:33.555Z" }, { url = "https://files.pythonhosted.org/packages/9a/07/d9412f3d7d462347e4511181dea65e47e0d0e16e26fbee2ea86a2aefb657/xxhash-3.6.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:01362c4331775398e7bb34e3ab403bc9ee9f7c497bc7dee6272114055277dd3c", size = 32744, upload-time = "2025-10-02T14:34:34.622Z" }, { url = "https://files.pythonhosted.org/packages/79/35/0429ee11d035fc33abe32dca1b2b69e8c18d236547b9a9b72c1929189b9a/xxhash-3.6.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b7b2df81a23f8cb99656378e72501b2cb41b1827c0f5a86f87d6b06b69f9f204", size = 30816, upload-time = "2025-10-02T14:34:36.043Z" }, { url = "https://files.pythonhosted.org/packages/b7/f2/57eb99aa0f7d98624c0932c5b9a170e1806406cdbcdb510546634a1359e0/xxhash-3.6.0-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:dc94790144e66b14f67b10ac8ed75b39ca47536bf8800eb7c24b50271ea0c490", size = 194035, upload-time = "2025-10-02T14:34:37.354Z" }, @@ -2703,11 +2434,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/9a/9a/c19c42c5b3f5a4aad748a6d5b4f23df3bed7ee5445accc65a0fb3ff03953/xxhash-3.6.0-cp314-cp314t-win32.whl", hash = "sha256:5851f033c3030dd95c086b4a36a2683c2ff4a799b23af60977188b057e467119", size = 31586, upload-time = "2025-10-02T14:36:15.603Z" }, { url = "https://files.pythonhosted.org/packages/03/d6/4cc450345be9924fd5dc8c590ceda1db5b43a0a889587b0ae81a95511360/xxhash-3.6.0-cp314-cp314t-win_amd64.whl", hash = "sha256:0444e7967dac37569052d2409b00a8860c2135cff05502df4da80267d384849f", size = 32526, upload-time = "2025-10-02T14:36:16.708Z" }, { url = "https://files.pythonhosted.org/packages/0f/c9/7243eb3f9eaabd1a88a5a5acadf06df2d83b100c62684b7425c6a11bcaa8/xxhash-3.6.0-cp314-cp314t-win_arm64.whl", hash = "sha256:bb79b1e63f6fd84ec778a4b1916dfe0a7c3fdb986c06addd5db3a0d413819d95", size = 28898, upload-time = "2025-10-02T14:36:17.843Z" }, - { url = "https://files.pythonhosted.org/packages/93/1e/8aec23647a34a249f62e2398c42955acd9b4c6ed5cf08cbea94dc46f78d2/xxhash-3.6.0-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:0f7b7e2ec26c1666ad5fc9dbfa426a6a3367ceaf79db5dd76264659d509d73b0", size = 30662, upload-time = "2025-10-02T14:37:01.743Z" }, - { url = "https://files.pythonhosted.org/packages/b8/0b/b14510b38ba91caf43006209db846a696ceea6a847a0c9ba0a5b1adc53d6/xxhash-3.6.0-pp311-pypy311_pp73-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:5dc1e14d14fa0f5789ec29a7062004b5933964bb9b02aae6622b8f530dc40296", size = 41056, upload-time = "2025-10-02T14:37:02.879Z" }, - { url = "https://files.pythonhosted.org/packages/50/55/15a7b8a56590e66ccd374bbfa3f9ffc45b810886c8c3b614e3f90bd2367c/xxhash-3.6.0-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:881b47fc47e051b37d94d13e7455131054b56749b91b508b0907eb07900d1c13", size = 36251, upload-time = "2025-10-02T14:37:04.44Z" }, - { url = "https://files.pythonhosted.org/packages/62/b2/5ac99a041a29e58e95f907876b04f7067a0242cb85b5f39e726153981503/xxhash-3.6.0-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c6dc31591899f5e5666f04cc2e529e69b4072827085c1ef15294d91a004bc1bd", size = 32481, upload-time = "2025-10-02T14:37:05.869Z" }, - { url = "https://files.pythonhosted.org/packages/7b/d9/8d95e906764a386a3d3b596f3c68bb63687dfca806373509f51ce8eea81f/xxhash-3.6.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:15e0dac10eb9309508bfc41f7f9deaa7755c69e35af835db9cb10751adebc35d", size = 31565, upload-time = "2025-10-02T14:37:06.966Z" }, ] [[package]] @@ -2716,23 +2442,6 @@ version = "0.25.0" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/fd/aa/3e0508d5a5dd96529cdc5a97011299056e14c6505b678fd58938792794b1/zstandard-0.25.0.tar.gz", hash = "sha256:7713e1179d162cf5c7906da876ec2ccb9c3a9dcbdffef0cc7f70c3667a205f0b", size = 711513, upload-time = "2025-09-14T22:15:54.002Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/2a/83/c3ca27c363d104980f1c9cee1101cc8ba724ac8c28a033ede6aab89585b1/zstandard-0.25.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:933b65d7680ea337180733cf9e87293cc5500cc0eb3fc8769f4d3c88d724ec5c", size = 795254, upload-time = "2025-09-14T22:16:26.137Z" }, - { url = "https://files.pythonhosted.org/packages/ac/4d/e66465c5411a7cf4866aeadc7d108081d8ceba9bc7abe6b14aa21c671ec3/zstandard-0.25.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a3f79487c687b1fc69f19e487cd949bf3aae653d181dfb5fde3bf6d18894706f", size = 640559, upload-time = "2025-09-14T22:16:27.973Z" }, - { url = "https://files.pythonhosted.org/packages/12/56/354fe655905f290d3b147b33fe946b0f27e791e4b50a5f004c802cb3eb7b/zstandard-0.25.0-cp311-cp311-manylinux2010_i686.manylinux2014_i686.manylinux_2_12_i686.manylinux_2_17_i686.whl", hash = "sha256:0bbc9a0c65ce0eea3c34a691e3c4b6889f5f3909ba4822ab385fab9057099431", size = 5348020, upload-time = "2025-09-14T22:16:29.523Z" }, - { url = "https://files.pythonhosted.org/packages/3b/13/2b7ed68bd85e69a2069bcc72141d378f22cae5a0f3b353a2c8f50ef30c1b/zstandard-0.25.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:01582723b3ccd6939ab7b3a78622c573799d5d8737b534b86d0e06ac18dbde4a", size = 5058126, upload-time = "2025-09-14T22:16:31.811Z" }, - { url = "https://files.pythonhosted.org/packages/c9/dd/fdaf0674f4b10d92cb120ccff58bbb6626bf8368f00ebfd2a41ba4a0dc99/zstandard-0.25.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:5f1ad7bf88535edcf30038f6919abe087f606f62c00a87d7e33e7fc57cb69fcc", size = 5405390, upload-time = "2025-09-14T22:16:33.486Z" }, - { url = "https://files.pythonhosted.org/packages/0f/67/354d1555575bc2490435f90d67ca4dd65238ff2f119f30f72d5cde09c2ad/zstandard-0.25.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:06acb75eebeedb77b69048031282737717a63e71e4ae3f77cc0c3b9508320df6", size = 5452914, upload-time = "2025-09-14T22:16:35.277Z" }, - { url = "https://files.pythonhosted.org/packages/bb/1f/e9cfd801a3f9190bf3e759c422bbfd2247db9d7f3d54a56ecde70137791a/zstandard-0.25.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:9300d02ea7c6506f00e627e287e0492a5eb0371ec1670ae852fefffa6164b072", size = 5559635, upload-time = "2025-09-14T22:16:37.141Z" }, - { url = "https://files.pythonhosted.org/packages/21/88/5ba550f797ca953a52d708c8e4f380959e7e3280af029e38fbf47b55916e/zstandard-0.25.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:bfd06b1c5584b657a2892a6014c2f4c20e0db0208c159148fa78c65f7e0b0277", size = 5048277, upload-time = "2025-09-14T22:16:38.807Z" }, - { url = "https://files.pythonhosted.org/packages/46/c0/ca3e533b4fa03112facbe7fbe7779cb1ebec215688e5df576fe5429172e0/zstandard-0.25.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:f373da2c1757bb7f1acaf09369cdc1d51d84131e50d5fa9863982fd626466313", size = 5574377, upload-time = "2025-09-14T22:16:40.523Z" }, - { url = "https://files.pythonhosted.org/packages/12/9b/3fb626390113f272abd0799fd677ea33d5fc3ec185e62e6be534493c4b60/zstandard-0.25.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:6c0e5a65158a7946e7a7affa6418878ef97ab66636f13353b8502d7ea03c8097", size = 4961493, upload-time = "2025-09-14T22:16:43.3Z" }, - { url = "https://files.pythonhosted.org/packages/cb/d3/23094a6b6a4b1343b27ae68249daa17ae0651fcfec9ed4de09d14b940285/zstandard-0.25.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:c8e167d5adf59476fa3e37bee730890e389410c354771a62e3c076c86f9f7778", size = 5269018, upload-time = "2025-09-14T22:16:45.292Z" }, - { url = "https://files.pythonhosted.org/packages/8c/a7/bb5a0c1c0f3f4b5e9d5b55198e39de91e04ba7c205cc46fcb0f95f0383c1/zstandard-0.25.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:98750a309eb2f020da61e727de7d7ba3c57c97cf6213f6f6277bb7fb42a8e065", size = 5443672, upload-time = "2025-09-14T22:16:47.076Z" }, - { url = "https://files.pythonhosted.org/packages/27/22/503347aa08d073993f25109c36c8d9f029c7d5949198050962cb568dfa5e/zstandard-0.25.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:22a086cff1b6ceca18a8dd6096ec631e430e93a8e70a9ca5efa7561a00f826fa", size = 5822753, upload-time = "2025-09-14T22:16:49.316Z" }, - { url = "https://files.pythonhosted.org/packages/e2/be/94267dc6ee64f0f8ba2b2ae7c7a2df934a816baaa7291db9e1aa77394c3c/zstandard-0.25.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:72d35d7aa0bba323965da807a462b0966c91608ef3a48ba761678cb20ce5d8b7", size = 5366047, upload-time = "2025-09-14T22:16:51.328Z" }, - { url = "https://files.pythonhosted.org/packages/7b/a3/732893eab0a3a7aecff8b99052fecf9f605cf0fb5fb6d0290e36beee47a4/zstandard-0.25.0-cp311-cp311-win32.whl", hash = "sha256:f5aeea11ded7320a84dcdd62a3d95b5186834224a9e55b92ccae35d21a8b63d4", size = 436484, upload-time = "2025-09-14T22:16:55.005Z" }, - { url = "https://files.pythonhosted.org/packages/43/a3/c6155f5c1cce691cb80dfd38627046e50af3ee9ddc5d0b45b9b063bfb8c9/zstandard-0.25.0-cp311-cp311-win_amd64.whl", hash = "sha256:daab68faadb847063d0c56f361a289c4f268706b598afbf9ad113cbe5c38b6b2", size = 506183, upload-time = "2025-09-14T22:16:52.753Z" }, - { url = "https://files.pythonhosted.org/packages/8c/3e/8945ab86a0820cc0e0cdbf38086a92868a9172020fdab8a03ac19662b0e5/zstandard-0.25.0-cp311-cp311-win_arm64.whl", hash = "sha256:22a06c5df3751bb7dc67406f5374734ccee8ed37fc5981bf1ad7041831fa1137", size = 462533, upload-time = "2025-09-14T22:16:53.878Z" }, { url = "https://files.pythonhosted.org/packages/82/fc/f26eb6ef91ae723a03e16eddb198abcfce2bc5a42e224d44cc8b6765e57e/zstandard-0.25.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7b3c3a3ab9daa3eed242d6ecceead93aebbb8f5f84318d82cee643e019c4b73b", size = 795738, upload-time = "2025-09-14T22:16:56.237Z" }, { url = "https://files.pythonhosted.org/packages/aa/1c/d920d64b22f8dd028a8b90e2d756e431a5d86194caa78e3819c7bf53b4b3/zstandard-0.25.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:913cbd31a400febff93b564a23e17c3ed2d56c064006f54efec210d586171c00", size = 640436, upload-time = "2025-09-14T22:16:57.774Z" }, { url = "https://files.pythonhosted.org/packages/53/6c/288c3f0bd9fcfe9ca41e2c2fbfd17b2097f6af57b62a81161941f09afa76/zstandard-0.25.0-cp312-cp312-manylinux2010_i686.manylinux2014_i686.manylinux_2_12_i686.manylinux_2_17_i686.whl", hash = "sha256:011d388c76b11a0c165374ce660ce2c8efa8e5d87f34996aa80f9c0816698b64", size = 5343019, upload-time = "2025-09-14T22:16:59.302Z" }, From 0fefaed57fd32bd00717e5500f366dd030d84e92 Mon Sep 17 00:00:00 2001 From: Scarlett Attensil Date: Thu, 8 Oct 2026 12:05:40 -0700 Subject: [PATCH 02/12] Fix dict-config regressions left by the graph migration Carries the same three fixes from the agent-graphs branch, which shares these files verbatim. Configs are plain dicts now, but these call sites were still reading them as objects, and none of them failed loudly. extract_tool_configs_from_launchdarkly read config.tools and config.to_dict(). Both fail on a dict, and the to_dict() call raised inside a try that logged and returned empty, so every node in the graph ran with no tools at all. Tools are read from model.parameters.tools, which is where LaunchDarkly serves them. edge.target_config does not exist on GraphEdge; the attribute is target_key. This raised on the first routing decision, so the graph could not advance past its root node. generic_agent read max_tool_calls through agent_config.to_dict() inside a try that fell back to 20, so a config setting a lower ceiling silently did not get it. _update_context recovered the variation key from a private tracker attribute behind a hasattr guard that is always false on a dict, so every node reported variation "default" and model "unknown". Both come off the node now, from meta["variationKey"] and the model dict. clear_cache already exists on this branch's config manager, so unlike agent-graphs nothing had to be restored there. Verified offline against a stub client: a two-node graph resolves, edges expose target_key, tools come back from model.parameters, and the tracker emits only current event keys. --- agents/generic_agent.py | 10 ++++++---- api/services/agent_service.py | 21 ++++++++++---------- tools_impl/dynamic_tool_factory.py | 32 +++++++++++++++++------------- 3 files changed, 35 insertions(+), 28 deletions(-) diff --git a/agents/generic_agent.py b/agents/generic_agent.py index 57e651e..72b6690 100644 --- a/agents/generic_agent.py +++ b/agents/generic_agent.py @@ -109,11 +109,13 @@ async def _execute_with_tools(self, model, instructions: str, messages: list) -> # Get max_tool_calls from config max_tool_calls = 20 # Default higher for tool-using agents try: - config_dict = agent_config.to_dict() - # Try multiple possible paths for custom parameters - custom = config_dict.get('model', {}).get('custom', {}) or {} + # Plain dict, so no to_dict(). parse_ai_config passes + # model.custom through untouched; older configs put the same + # values under model.parameters.custom. + model_dict = agent_config.get('model') or {} + custom = model_dict.get('custom') or {} if not custom: - custom = config_dict.get('model', {}).get('parameters', {}).get('custom', {}) or {} + custom = (model_dict.get('parameters') or {}).get('custom') or {} if 'max_tool_calls' in custom: max_tool_calls = int(custom['max_tool_calls']) log_student(f"CONFIG: max_tool_calls={max_tool_calls} from LaunchDarkly") diff --git a/api/services/agent_service.py b/api/services/agent_service.py index 5714cab..c4ce5b3 100644 --- a/api/services/agent_service.py +++ b/api/services/agent_service.py @@ -141,7 +141,7 @@ async def execute_with_graph( graph_tracker.track_tool_call(node_key, tool_name) # Update context with results (generic) - self._update_context(node_key, config, result, ctx) + self._update_context(node_key, config, result, ctx, current_node.meta) # Find next node (edges already fetched above) if not edges: @@ -174,8 +174,8 @@ def _select_next_node(self, edges, result: dict, nodes: dict, graph_tracker=None handoff = edge.handoff or {} route = handoff.get("route", "").lower().strip() if route: - route_map[route] = edge.target_config - log_student(f" EDGE: → {edge.target_config} (route={route})") + route_map[route] = edge.target_key + log_student(f" EDGE: → {edge.target_key} (route={route})") # Exact match only - fail closed on unrecognized routes if routing and routing in route_map: @@ -189,13 +189,13 @@ def _select_next_node(self, edges, result: dict, nodes: dict, graph_tracker=None # Default: first edge (fallback) if edges: - default = edges[0].target_config + default = edges[0].target_key log_student(f" DEFAULT: → {default}") return nodes.get(default) return None - def _update_context(self, node_key: str, config, result: dict, ctx: dict): + def _update_context(self, node_key: str, config, result: dict, ctx: dict, meta: dict = None): """Update context with agent results - fully generic.""" # Aggregate tokens if "_token_usage" in result: @@ -210,16 +210,17 @@ def _update_context(self, node_key: str, config, result: dict, ctx: dict): if "tool_calls" in result: ctx["tool_calls"] = result["tool_calls"] - # Get variation key - var_key = "default" - if hasattr(config, 'tracker') and hasattr(config.tracker, '_variation_key'): - var_key = config.tracker._variation_key + # The variation key is public metadata on the node now. The previous + # version read a private tracker attribute behind a hasattr guard, + # which on a plain dict is always False and so always reported + # "default" no matter which variation actually ran. + var_key = (meta or {}).get("variationKey") or "unknown" # Record agent config - fully generic, include all result fields agent_info = { "agent_name": node_key, "variation_key": var_key, - "model": config.model.name if hasattr(config, 'model') else "unknown", + "model": ((config or {}).get("model") or {}).get("name", "unknown"), "tools_used": result.get("tool_calls", []), } diff --git a/tools_impl/dynamic_tool_factory.py b/tools_impl/dynamic_tool_factory.py index 81efc19..ae7404a 100644 --- a/tools_impl/dynamic_tool_factory.py +++ b/tools_impl/dynamic_tool_factory.py @@ -20,22 +20,26 @@ def extract_tool_configs_from_launchdarkly(config) -> tuple[List[str], Dict[str, tools_list = [] tool_configs = {} - # Get tools from the initial config (tools are stable, instructions are dynamic) - if hasattr(config, 'tools') and config.tools: - tools_list = list(config.tools) + # Configs are plain dicts now, so there is no to_dict() and no attribute + # access. Both lookups below used to fail into the except branch, which + # returned no tools at all rather than erroring. + config = config or {} - # Try to get tool configurations from config dict structure + # A top-level `tools` key is what the local defaults file writes. + for tool_name in config.get('tools') or []: + if tool_name not in tools_list: + tools_list.append(tool_name) + + # LaunchDarkly serves tools under model.parameters.tools, with the schema. try: - config_dict = config.to_dict() - if 'model' in config_dict and 'parameters' in config_dict['model'] and 'tools' in config_dict['model']['parameters']: - tools_data = config_dict['model']['parameters']['tools'] - for tool in tools_data: - if 'name' in tool: - tool_name = tool['name'] - if tool_name not in tools_list: - tools_list.append(tool_name) - # Extract tool parameters/schema from LaunchDarkly - tool_configs[tool_name] = tool.get('parameters', {}) + tools_data = ((config.get('model') or {}).get('parameters') or {}).get('tools') or [] + for tool in tools_data: + if 'name' in tool: + tool_name = tool['name'] + if tool_name not in tools_list: + tools_list.append(tool_name) + # Extract tool parameters/schema from LaunchDarkly + tool_configs[tool_name] = tool.get('parameters', {}) log_debug(f"EXTRACTED TOOLS FROM LAUNCHDARKLY: {tools_list}") if tool_configs: From 08ddb1daf143e7a32c4565f14a0719f3e5485170 Mon Sep 17 00:00:00 2001 From: Scarlett Attensil Date: Wed, 18 Nov 2026 12:09:08 -0800 Subject: [PATCH 03/12] Move offline evals to AI SDK 1.1.0 and current models. Pins launchdarkly-ai-server>=1.1.0 and launchdarkly-server-sdk>=9.18.4. The shared runtime files now match tutorial/agent-graphs, which is already on 1.x: graph events carry the node's config and variation keys so monitoring attributes them, contexts are converted before track() so events are not dropped, feedback no longer reads a tracker that dicts don't have, and the security agent's redacted text replaces the original message for later nodes. Feedback names support-agent and its served variation again, as it did before the SDK move, so monitoring counts thumbs up and down. Models move to Claude Haiku 5.5, Claude Sonnet 5.5, gpt-6-luna and gpt-6.2-sol. None of them accept temperature, and GPT-6 needs the Responses API for tool calls, whose replies are content blocks, so responses are read with .text. The pii-detector prompt now asks for its fields inside the closing JSON, which Haiku 5.5 otherwise leaves out about half the time. nest_asyncio was imported but never installed on this branch, so the first chat failed; nothing on the async path needs it, so the import is gone. Bootstrap retries rate-limited API calls instead of skipping them, which left a variation and its targeting rule missing. --- README.md | 24 ++--- agents/generic_agent.py | 32 +++--- agents/ld_agent_helpers.py | 15 ++- api/main.py | 17 +--- api/services/agent_service.py | 47 +++------ bootstrap/ai_config_manifest.yaml | 16 +-- bootstrap/create_configs.py | 65 ++++++------ config_manager.py | 160 ++++++++++++------------------ pyproject.toml | 8 +- tools/traffic_generator.py | 6 +- uv.lock | 38 +++---- 11 files changed, 178 insertions(+), 250 deletions(-) diff --git a/README.md b/README.md index 8afd80d..f1d8be5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Multi-Agent Chatbot with LaunchDarkly AI Configs +# Multi-Agent Chatbot with LaunchDarkly AgentControl Demo application for the [Agent Graphs tutorial](https://docs.launchdarkly.com/tutorials/agent-graphs). @@ -10,7 +10,7 @@ cp .env.example .env uv sync uv run python initialize_embeddings.py --force -uv run python bootstrap/create_configs.py +(cd bootstrap && uv run python create_configs.py) # Terminal 1 uv run uvicorn api.main:app --reload --port 8000 @@ -34,22 +34,22 @@ Open http://localhost:8501 ### LaunchDarkly Integration | File | Purpose | |------|---------| -| `config_manager.py` | **Core LD integration** - fetches AI Configs and Agent Graphs | +| `config_manager.py` | **Core LD integration** - fetches AgentControl configs and agent graphs | | `api/services/agent_service.py` | **Graph orchestration** - traverses Agent Graph, routes between agents | -| `bootstrap/create_configs.py` | Creates AI Configs, tools, segments, and targeting rules in LD | +| `bootstrap/create_configs.py` | Creates AgentControl configs, tools, segments, and targeting rules in LD | ### Agents | File | Purpose | |------|---------| -| `agents/supervisor_agent.py` | Routes requests based on PII likelihood (uses LD AI Config) | -| `agents/security_agent.py` | Detects and redacts PII (uses LD AI Config) | -| `agents/support_agent.py` | Answers questions with tools (uses LD AI Config + tools) | +| `agents/supervisor_agent.py` | Routes requests based on PII likelihood (uses an AgentControl config) | +| `agents/security_agent.py` | Detects and redacts PII (uses an AgentControl config) | +| `agents/support_agent.py` | Answers questions with tools (uses an AgentControl config + tools) | | `agents/ld_agent_helpers.py` | Shared helpers - model creation, metric tracking | ### Tools | File | Purpose | |------|---------| -| `tools_impl/dynamic_tool_factory.py` | Creates tools from LD AI Config definitions | +| `tools_impl/dynamic_tool_factory.py` | Creates tools from AgentControl config definitions | | `tools_impl/search_v1.py` | Basic keyword search | | `tools_impl/search_v2.py` | Semantic vector search | | `tools_impl/reranking.py` | BM25 relevance scoring | @@ -70,7 +70,7 @@ Open http://localhost:8501 ┌─────────────────────────────────────────────────────────────┐ │ LaunchDarkly Dashboard │ │ • Agent Graph (chatbot-flow) │ -│ • AI Configs (supervisor, security, support) │ +│ • AgentControl configs (supervisor, security, support) │ │ • Targeting rules (free/paid, EU/other) │ └─────────────────────────────────────────────────────────────┘ │ @@ -78,7 +78,7 @@ Open http://localhost:8501 ┌─────────────────────────────────────────────────────────────┐ │ config_manager.py │ │ • get_agent_graph() → fetches graph topology │ -│ • get_config() → fetches AI Config for each agent │ +│ • get_config() → fetches the config for each agent │ │ • Handles targeting based on user context │ └─────────────────────────────────────────────────────────────┘ │ @@ -95,7 +95,7 @@ Open http://localhost:8501 │ agents/*.py │ │ • Each agent receives config from LD │ │ • Uses config.instructions, config.model │ -│ • Tracks metrics via config.tracker │ +│ • Executor sends metrics through the graph tracker │ └─────────────────────────────────────────────────────────────┘ ``` @@ -103,7 +103,7 @@ Open http://localhost:8501 | Change | Deploy Required? | |--------|-----------------| -| Model (gpt-4o → claude-sonnet) | No | +| Model (gpt-6-luna → claude-sonnet-5-5) | No | | Prompt/instructions | No | | Graph edges (routing) | No | | Targeting rules (user segments) | No | diff --git a/agents/generic_agent.py b/agents/generic_agent.py index 72b6690..935e8fd 100644 --- a/agents/generic_agent.py +++ b/agents/generic_agent.py @@ -50,8 +50,7 @@ async def ainvoke(self, state: dict) -> dict: model = create_model_for_config( provider=provider_name, model=model_cfg.get("name"), - config_manager=config_manager, - temperature=0.3 + config_manager=config_manager ) log_student(f"CONFIG: {provider_name} - {model_cfg.get('name')}") @@ -68,7 +67,7 @@ async def ainvoke(self, state: dict) -> dict: # If this node has outgoing edges with routes, inject route options into instructions if self.valid_routes: - route_instruction = f"\n\nYou must select one of these routes: {self.valid_routes}. Return your choice in this exact JSON format at the end of your response: {{\"route\": \"\"}}" + route_instruction = f"\n\nYou must select one of these routes: {self.valid_routes}. End your response with one JSON object on a single line containing your choice and any fields your instructions ask for, for example: {{\"route\": \"\"}}" instructions = instructions + route_instruction log_student(f"ROUTES AVAILABLE: {self.valid_routes}") @@ -142,8 +141,8 @@ async def _execute_with_tools(self, model, instructions: str, messages: list) -> for msg in result.get("messages", []): if isinstance(msg, AIMessage): - if msg.content: - response_text = msg.content + if msg.text: + response_text = msg.text if hasattr(msg, 'tool_calls') and msg.tool_calls: for tc in msg.tool_calls: # Handle both dict and object access @@ -157,10 +156,10 @@ async def _execute_with_tools(self, model, instructions: str, messages: list) -> "total": msg.usage_metadata.get("total_tokens", 0) } - # Extract route if present - route = self._extract_route(response_text) + route, fields = self._extract_route(response_text) return { + **fields, "response": response_text, "routing_decision": route, "tool_calls": tool_calls, @@ -173,7 +172,7 @@ async def _execute_simple(self, model, instructions: str, messages: list) -> dic full_messages = [SystemMessage(content=instructions)] + messages response = await model.ainvoke(full_messages) - response_text = response.content if hasattr(response, 'content') else str(response) + response_text = response.text # Extract token usage token_usage = {"input": 0, "output": 0, "total": 0} @@ -184,20 +183,20 @@ async def _execute_simple(self, model, instructions: str, messages: list) -> dic "total": response.usage_metadata.get("total_tokens", 0) } - # Extract route if present - route = self._extract_route(response_text) + route, fields = self._extract_route(response_text) if route: log_student(f"ROUTE SELECTED: {route}") return { + **fields, "response": response_text, "routing_decision": route, "tool_calls": [], "_token_usage": token_usage } - def _extract_route(self, response_text: str) -> Optional[str]: - """Extract route from response JSON with strict validation.""" + def _extract_route(self, response_text: str) -> tuple[Optional[str], dict]: + """Extract the route and any other fields from the response JSON.""" import json import re @@ -214,6 +213,7 @@ def _extract_route(self, response_text: str) -> Optional[str]: try: data = json.loads(match.group(1)) route = data.get("route", "").lower().strip() + fields = {k: v for k, v in data.items() if k != "route" and not k.startswith("_")} # Exact match validation against valid routes if self.valid_routes: @@ -221,14 +221,14 @@ def _extract_route(self, response_text: str) -> Optional[str]: if route in valid_lower: # Return the original casing from valid_routes idx = valid_lower.index(route) - return self.valid_routes[idx] + return self.valid_routes[idx], fields else: log_student(f"INVALID ROUTE: '{route}' not in {self.valid_routes}") - return None - return route + return None, fields + return route, fields except json.JSONDecodeError: continue - return None + return None, {} return GenericAgent() diff --git a/agents/ld_agent_helpers.py b/agents/ld_agent_helpers.py index 8eef8f3..47dcc56 100644 --- a/agents/ld_agent_helpers.py +++ b/agents/ld_agent_helpers.py @@ -1,8 +1,5 @@ """LaunchDarkly AI agent helpers - model creation and metric tracking.""" import asyncio -import nest_asyncio -nest_asyncio.apply() # Allow nested event loops (fixes FastAPI + asyncio.run conflict) - import time import os from typing import List, Any, Tuple @@ -76,7 +73,7 @@ def create_bedrock_chat_model(model_id: str, session: boto3.Session, region: str ) -def create_model_for_config(provider: str, model: str, config_manager, temperature: float = 0.0): +def create_model_for_config(provider: str, model: str, config_manager): """Create LangChain chat model based on provider and auth method.""" from utils.bedrock_helpers import normalize_bedrock_provider @@ -89,14 +86,16 @@ def create_model_for_config(provider: str, model: str, config_manager, temperatu return create_bedrock_chat_model( model_id=model, session=config_manager.boto3_session, - region=config_manager.aws_region, - temperature=temperature + region=config_manager.aws_region ) else: fallback = 'anthropic' if provider.lower() == 'anthropic' else langchain_provider - return init_chat_model(model=model, model_provider=fallback, temperature=temperature) + return init_chat_model(model=model, model_provider=fallback) + elif langchain_provider == 'openai': + # GPT-6 models accept function tools only on the Responses API + return init_chat_model(model=model, model_provider=langchain_provider, use_responses_api=True) else: - return init_chat_model(model=model, model_provider=langchain_provider, temperature=temperature) + return init_chat_model(model=model, model_provider=langchain_provider) def extract_token_usage(response) -> dict: diff --git a/api/main.py b/api/main.py index 889f528..5a99ad0 100644 --- a/api/main.py +++ b/api/main.py @@ -80,22 +80,15 @@ async def submit_feedback(feedback: FeedbackRequest): try: log_student(f"FEEDBACK: {feedback.feedback} from {feedback.source}") - # Get LaunchDarkly tracker and submit feedback try: - # Get a real LaunchDarkly AI config to get the tracker with user context - support_config = await agent_service.config_manager.get_config( + context = agent_service.config_manager.build_context( feedback.user_id, - "support-agent", feedback.user_context ) - - # Convert feedback format - thumbs_up = feedback.feedback == "positive" - - # Track feedback using config_manager - success = agent_service.config_manager.track_feedback( - support_config.tracker, - thumbs_up=thumbs_up + success = await agent_service.config_manager.track_feedback( + context, + "support-agent", + thumbs_up=feedback.feedback == "positive" ) if success: diff --git a/api/services/agent_service.py b/api/services/agent_service.py index c4ce5b3..7c9bf3a 100644 --- a/api/services/agent_service.py +++ b/api/services/agent_service.py @@ -46,8 +46,6 @@ async def execute_with_graph( sanitized_history: list = None ) -> Dict[str, Any]: """Execute agents by traversing the LaunchDarkly Agent Graph.""" - # get_agent_graph is async now and returns the tracker alongside the - # topology, because resolve_graph records nothing on its own. graph, graph_tracker = await self.config_manager.get_agent_graph(user_id, graph_key, user_context) if not graph.enabled: @@ -72,9 +70,6 @@ async def execute_with_graph( # Build node lookup nodes = {} - # Nodes expose `key` as an attribute rather than a get_key() method, - # and reverse_traverse is a coroutine -- without the await the lookup - # silently stays empty and every handoff target looks unknown. await graph.reverse_traverse(lambda node, _: nodes.update({node.key: node}), {}) log_student(f"GRAPH: '{graph_key}' with {len(nodes)} nodes: {list(nodes.keys())}") @@ -125,20 +120,12 @@ async def execute_with_graph( result = await agent.ainvoke(ctx) duration_ms = int((time.time() - node_start) * 1000) - self._track_duration(graph_tracker, node_key, config, duration_ms) - - # The node's success/error is emitted here rather than inside - # the agent, which no longer has a tracker. - if graph_tracker: - if result.get("_error"): - graph_tracker.track_node_error(node_key, config) - elif not result.get("_skipped"): - graph_tracker.track_node_success(node_key, config) - - # Track tool calls to LaunchDarkly - if graph_tracker and result.get("tool_calls"): - for tool_name in result["tool_calls"]: - graph_tracker.track_tool_call(node_key, tool_name) + if graph_tracker and not result.get("_skipped"): + graph_tracker.track_node_result( + current_node, duration_ms, not result.get("_error"), result.get("_token_usage") + ) + for tool_name in result.get("tool_calls") or []: + graph_tracker.track_tool_call(current_node, tool_name) # Update context with results (generic) self._update_context(node_key, config, result, ctx, current_node.meta) @@ -210,10 +197,12 @@ def _update_context(self, node_key: str, config, result: dict, ctx: dict, meta: if "tool_calls" in result: ctx["tool_calls"] = result["tool_calls"] - # The variation key is public metadata on the node now. The previous - # version read a private tracker attribute behind a hasattr guard, - # which on a plain dict is always False and so always reported - # "default" no matter which variation actually ran. + # Downstream nodes read ctx["messages"], so redacted text has to replace + # the original message or the PII reaches them anyway. + if result.get("redacted"): + ctx["processed_input"] = result["redacted"] + ctx["messages"] = [HumanMessage(content=result["redacted"])] + var_key = (meta or {}).get("variationKey") or "unknown" # Record agent config - fully generic, include all result fields @@ -231,23 +220,11 @@ def _update_context(self, node_key: str, config, result: dict, ctx: dict, meta: ctx["agent_configs"].append(agent_info) - def _track_duration(self, graph_tracker, node_key: str, config, duration_ms: int): - """Track node duration. - - Takes the NODE key. The previous version was handed the graph key and - recovered the node's config key from a private tracker attribute; the - caller has the node key directly. - """ - if not graph_tracker or not config: - return - graph_tracker.track_node_duration(node_key, config, duration_ms) - def _track_graph_metrics(self, graph_tracker, ctx: dict, path: list, start_time: float): """Track overall graph metrics.""" if not graph_tracker: return - graph_tracker.track_path(path) latency_ms = int((time.time() - start_time) * 1000) graph_tracker.track_latency(latency_ms) log_student(f"LATENCY: {latency_ms}ms") diff --git a/bootstrap/ai_config_manifest.yaml b/bootstrap/ai_config_manifest.yaml index f60ce71..bf949c8 100644 --- a/bootstrap/ai_config_manifest.yaml +++ b/bootstrap/ai_config_manifest.yaml @@ -122,7 +122,7 @@ project: - key: "supervisor-basic" modelConfig: provider: "anthropic" - modelId: "Anthropic.claude-sonnet-4-20250514" + modelId: "Anthropic.claude-haiku-5-5" instructions: | You are a routing supervisor. Analyze user input for PII and route accordingly. @@ -153,11 +153,11 @@ project: - key: "pii-detector" modelConfig: provider: "anthropic" - modelId: "Anthropic.claude-sonnet-4-20250514" + modelId: "Anthropic.claude-haiku-5-5" instructions: | You are a privacy agent that REMOVES PII and formats the input for another process. Analyze the input text and identify any personally identifiable information including: Email addresses, Phone numbers, Social Security Numbers, Names (first, last, full names), Physical addresses, Credit card numbers, Driver's license numbers, Any other sensitive personal data. - Respond with: + Put these fields in the JSON object that ends your response: - detected: true if any PII was found, false otherwise - types: array of PII types found (e.g., ['email', 'name', 'phone']) - redacted: the input text with PII replaced by [REDACTED], keeping the text readable and natural @@ -220,7 +220,7 @@ project: - key: "rag-search-enhanced" modelConfig: provider: "anthropic" - modelId: "Anthropic.claude-sonnet-4-20250514" + modelId: "Anthropic.claude-sonnet-5-5" tools: ["search_v2", "reranking"] instructions: | You are Umbra's support assistant. Umbra is a cloud deployment platform for developers. @@ -242,7 +242,7 @@ project: - key: "eu-free" modelConfig: provider: "anthropic" - modelId: "Anthropic.claude-3-haiku-20240307" + modelId: "Anthropic.claude-haiku-5-5" tools: ["search_v1"] instructions: | You are Umbra's support assistant for EU users on the free tier. Use search_v1 to find information from Umbra's documentation about billing, deployments, regions, and account management. Follow EU privacy requirements. Only answer based on documentation - never make up policies. @@ -252,7 +252,7 @@ project: - key: "eu-paid" modelConfig: provider: "anthropic" - modelId: "Anthropic.claude-sonnet-4-20250514" + modelId: "Anthropic.claude-sonnet-5-5" tools: ["search_v1", "search_v2", "reranking"] instructions: | You are Umbra's premium support assistant for EU paid users. Use your search tools to find accurate information from Umbra's documentation. EU privacy laws require strict data handling. Only answer based on documentation - never make up policies. Mention document names when citing sources but do NOT generate markdown links. @@ -262,7 +262,7 @@ project: - key: "other-free" modelConfig: provider: "openai" - modelId: "OpenAI.gpt-4o-mini-2024-07-18" + modelId: "OpenAI.gpt-6-luna" tools: ["search_v1"] instructions: | You are Umbra's support assistant. Use search_v1 to find information from Umbra's documentation about billing, deployments, regions, and account management. Only answer based on documentation - never make up policies. @@ -272,7 +272,7 @@ project: - key: "other-paid" modelConfig: provider: "openai" - modelId: "OpenAI.gpt-4o" + modelId: "OpenAI.gpt-6.2-sol" tools: ["search_v1", "search_v2", "reranking"] instructions: | You are Umbra's premium support assistant. Use your search tools to find accurate information from Umbra's documentation about billing, deployments, regions, features, and troubleshooting. Only answer based on documentation - never make up policies. Mention document names when citing sources but do NOT generate markdown links. diff --git a/bootstrap/create_configs.py b/bootstrap/create_configs.py index a5f9114..74f542e 100644 --- a/bootstrap/create_configs.py +++ b/bootstrap/create_configs.py @@ -11,6 +11,13 @@ import time from pathlib import Path from dotenv import load_dotenv +from requests.adapters import HTTPAdapter +from urllib3.util.retry import Retry + +# The LaunchDarkly API rate-limits bursts of writes; wait and retry instead of skipping the call. +http = requests.Session() +http.mount("https://", HTTPAdapter(max_retries=Retry( + total=5, backoff_factor=2, status_forcelist=[429], allowed_methods=None, raise_on_status=False))) class MultiAgentBootstrap: def __init__(self, api_key, base_url="https://app.launchdarkly.com"): @@ -29,7 +36,7 @@ def create_project(self, project_key, project_name=None): # Check if project exists check_url = f"{self.base_url}/api/v2/projects/{project_key}" - check_response = requests.get(check_url, headers=self.headers, timeout=30) + check_response = http.get(check_url, headers=self.headers, timeout=30) if check_response.status_code == 200: print(f" ✅ Project '{project_key}' exists") @@ -51,7 +58,7 @@ def create_project(self, project_key, project_name=None): "name": name } - response = requests.post(url, headers=self.headers, json=payload, timeout=30) + response = http.post(url, headers=self.headers, json=payload, timeout=30) if response.status_code in [200, 201]: print(f" ✅ Project '{project_key}' created") @@ -80,7 +87,7 @@ def create_segment(self, project_key, segment_data): "name": segment_data["key"].replace("-", " ").title() } - response = requests.post(url, headers=self.headers, json=payload, timeout=30) + response = http.post(url, headers=self.headers, json=payload, timeout=30) if response.status_code in [200, 201]: print(f" Empty segment '{segment_data['key']}' created") @@ -94,13 +101,13 @@ def create_segment(self, project_key, segment_data): print(f" Segment '{segment_data['key']}' already exists, deleting and recreating...") # Delete existing segment delete_url = f"{self.base_url}/api/v2/segments/{project_key}/production/{segment_data['key']}" - delete_response = requests.delete(delete_url, headers=self.headers, timeout=30) + delete_response = http.delete(delete_url, headers=self.headers, timeout=30) if delete_response.status_code == 204: print(f"🗑️ Deleted existing segment '{segment_data['key']}'") time.sleep(1) # Wait for deletion to propagate # Retry creation - retry_response = requests.post(url, headers=self.headers, json=payload, timeout=30) + retry_response = http.post(url, headers=self.headers, json=payload, timeout=30) if retry_response.status_code in [200, 201]: print(f" Empty segment '{segment_data['key']}' recreated") time.sleep(0.5) @@ -155,7 +162,7 @@ def add_segment_rules(self, project_key, segment_data): patch_headers = self.headers.copy() patch_headers["Content-Type"] = "application/json; domain-model=launchdarkly.semanticpatch" - response = requests.patch(url, headers=patch_headers, json=payload, timeout=30) + response = http.patch(url, headers=patch_headers, json=payload, timeout=30) if response.status_code == 200: result = response.json() @@ -173,7 +180,7 @@ def create_ai_config(self, project_key, config_data): # Check if config already exists check_url = f"{self.base_url}/api/v2/projects/{project_key}/ai-configs/{config_key}" - check_response = requests.get(check_url, headers=self.headers, timeout=30) + check_response = http.get(check_url, headers=self.headers, timeout=30) if check_response.status_code == 200: print(f" AI Config '{config_key}' exists, adding variations") @@ -215,7 +222,7 @@ def delete_variation_if_exists(self, project_key, config_key, variation_key): # Delete the variation delete_url = f"{self.base_url}/api/v2/projects/{project_key}/ai-configs/{config_key}/variations/{variation_id}" - delete_response = requests.delete(delete_url, headers=self.headers, timeout=30) + delete_response = http.delete(delete_url, headers=self.headers, timeout=30) if delete_response.status_code == 204: print(f" 🗑️ Deleted existing variation '{variation_key}'") @@ -250,7 +257,7 @@ def create_variation(self, project_key, config_key, variation_data): payload["modelConfigKey"] = model_config_key print(f" Using modelConfigKey: {model_config_key}") - response = requests.post(url, headers=self.headers, json=payload, timeout=30) + response = http.post(url, headers=self.headers, json=payload, timeout=30) if response.status_code in [200, 201]: print(f" Variation '{variation_data['key']}' created") @@ -293,7 +300,7 @@ def update_variation(self, project_key, config_key, variation_data): } print(f" Updating with modelConfigKey: {model_config_key}") - response = requests.patch(url, headers=self.headers, json=payload, timeout=30) + response = http.patch(url, headers=self.headers, json=payload, timeout=30) if response.status_code == 200: print(f" Variation '{variation_data['key']}' updated") @@ -372,7 +379,7 @@ def create_tool(self, project_key, tool_data): } print(f" Creating tool '{payload['key']}'") - response = requests.post(url, headers=self.headers, json=payload, timeout=30) + response = http.post(url, headers=self.headers, json=payload, timeout=30) if response.status_code in [200, 201]: print(f" Tool '{tool_data['key']}' created") @@ -393,7 +400,7 @@ def delete_tool(self, project_key, tool_key): """Delete tool from project""" url = f"{self.base_url}/api/v2/projects/{project_key}/ai-tools/{tool_key}" - response = requests.delete(url, headers=self.headers, timeout=30) + response = http.delete(url, headers=self.headers, timeout=30) if response.status_code == 204: print(f" 🗑️ Tool '{tool_key}' deleted") @@ -411,7 +418,7 @@ def delete_all_targeting_rules(self, project_key, config_key): url = f"{self.base_url}/api/v2/projects/{project_key}/ai-configs/{config_key}/targeting" # Get current targeting to understand existing rules and find disabled variation - response = requests.get(url, headers=self.headers, timeout=30) + response = http.get(url, headers=self.headers, timeout=30) if response.status_code != 200: print(f" Could not fetch targeting for '{config_key}'") return False @@ -464,7 +471,7 @@ def delete_all_targeting_rules(self, project_key, config_key): } print(f" Debug: Sending {len(instructions)} instructions to clear targeting") - response = requests.patch(url, headers=self.headers, json=payload, timeout=30) + response = http.patch(url, headers=self.headers, json=payload, timeout=30) if response.status_code == 200: print(f" 🗑️ Cleared {len(rules)} targeting rules for '{config_key}' (set to disabled)") @@ -477,7 +484,7 @@ def delete_all_targeting_rules(self, project_key, config_key): def get_targeting_variation_map(self, project_key, config_key): """Get targeting variation IDs (different from AI config variation IDs)""" url = f"{self.base_url}/api/v2/projects/{project_key}/ai-configs/{config_key}/targeting" - response = requests.get(url, headers=self.headers, timeout=30) + response = http.get(url, headers=self.headers, timeout=30) if response.status_code == 200: targeting_data = response.json() @@ -505,7 +512,7 @@ def get_targeting_variation_map(self, project_key, config_key): def get_ai_config_variation_id_map(self, project_key, config_key): """Get AI config variation IDs from the AI config itself (key -> _id).""" url = f"{self.base_url}/api/v2/projects/{project_key}/ai-configs/{config_key}" - response = requests.get(url, headers=self.headers, timeout=30) + response = http.get(url, headers=self.headers, timeout=30) if response.status_code != 200: print(f" Failed to fetch AI config variations for '{config_key}': {response.text}") @@ -518,7 +525,7 @@ def get_ai_config_variation_id_map(self, project_key, config_key): def list_variations(self, project_key, config_key): """List variations via the variations endpoint used for create/update/delete.""" url = f"{self.base_url}/api/v2/projects/{project_key}/ai-configs/{config_key}/variations" - response = requests.get(url, headers=self.headers, timeout=30) + response = http.get(url, headers=self.headers, timeout=30) if response.status_code != 200: print(f" Could not list variations for '{config_key}': {response.text}") return [] @@ -546,7 +553,7 @@ def update_variation_tools_only(self, project_key, config_key, variation_key, to "tools": [{"key": t, "version": 1} for t in (tools_list or [])] } - response = requests.patch(url, headers=self.headers, json=payload, timeout=30) + response = http.patch(url, headers=self.headers, json=payload, timeout=30) if response.status_code == 200: print(f" Updated tools for variation '{variation_key}' → {tools_list or []}") time.sleep(0.2) @@ -560,7 +567,7 @@ def ensure_ai_config_exists(self, project_key, config_data): config_key = config_data["key"] config_name = config_data.get("name", config_key.replace("-", " ").title()) url = f"{self.base_url}/api/v2/projects/{project_key}/ai-configs/{config_key}" - response = requests.get(url, headers=self.headers, timeout=30) + response = http.get(url, headers=self.headers, timeout=30) if response.status_code == 200: print(f" ✅ AI Config '{config_key}' exists") return True @@ -573,7 +580,7 @@ def ensure_ai_config_exists(self, project_key, config_data): "name": config_name, "mode": "agent" } - create_response = requests.post(create_url, headers=self.headers, json=payload, timeout=30) + create_response = http.post(create_url, headers=self.headers, json=payload, timeout=30) if create_response.status_code in [200, 201]: print(f" ✅ AI Config '{config_key}' created") time.sleep(0.5) @@ -594,12 +601,12 @@ def create_agent_graph(self, project_key, graph_data): # Check if graph exists check_url = f"{self.base_url}/api/v2/projects/{project_key}/agent-graphs/{graph_key}" - check_response = requests.get(check_url, headers=self.headers, timeout=30) + check_response = http.get(check_url, headers=self.headers, timeout=30) if check_response.status_code == 200: if self.overwrite: print(f" 🔄 Agent Graph '{graph_key}' exists, deleting for recreation...") - delete_response = requests.delete(check_url, headers=self.headers, timeout=30) + delete_response = http.delete(check_url, headers=self.headers, timeout=30) if delete_response.status_code not in [200, 204]: print(f" ❌ Failed to delete existing graph: {delete_response.text}") return False @@ -619,7 +626,7 @@ def create_agent_graph(self, project_key, graph_data): "rootConfigKey": graph_data.get("rootConfigKey") } - response = requests.post(create_url, headers=self.headers, json=payload, timeout=30) + response = http.post(create_url, headers=self.headers, json=payload, timeout=30) if response.status_code not in [200, 201]: print(f" ❌ Failed to create agent graph: {response.text}") @@ -664,7 +671,7 @@ def _ensure_graph_edges(self, project_key, graph_key, graph_data): "edges": edges } - patch_response = requests.patch(patch_url, headers=self.headers, json=patch_payload, timeout=30) + patch_response = http.patch(patch_url, headers=self.headers, json=patch_payload, timeout=30) if patch_response.status_code == 200: for edge in graph_data["edges"]: @@ -678,7 +685,7 @@ def _enable_agent_graph(self, project_key, graph_key): url = f"{self.base_url}/api/v2/projects/{project_key}/agent-graphs/{graph_key}" payload = {"instructions": [{"kind": "turnTargetingOn"}]} - response = requests.patch(url, headers=self.headers, json=payload, timeout=30) + response = http.patch(url, headers=self.headers, json=payload, timeout=30) if response.status_code == 200: print(f" ✅ Agent Graph '{graph_key}' enabled in production") @@ -690,7 +697,7 @@ def enable_ai_config(self, project_key, config_key, default_variation_key=None): url = f"{self.base_url}/api/v2/projects/{project_key}/ai-configs/{config_key}/targeting" # First get targeting to check status and find variation IDs - response = requests.get(url, headers=self.headers, timeout=30) + response = http.get(url, headers=self.headers, timeout=30) if response.status_code != 200: print(f" ❌ Could not get targeting for '{config_key}': {response.text}") return False @@ -714,7 +721,7 @@ def enable_ai_config(self, project_key, config_key, default_variation_key=None): "environmentKey": "production", "instructions": enable_instructions } - enable_response = requests.patch(url, headers=self.headers, json=enable_payload, timeout=30) + enable_response = http.patch(url, headers=self.headers, json=enable_payload, timeout=30) if enable_response.status_code == 200: print(f" ✅ AI Config '{config_key}' targeting enabled") else: @@ -746,7 +753,7 @@ def enable_ai_config(self, project_key, config_key, default_variation_key=None): "instructions": instructions } - patch_response = requests.patch(url, headers=self.headers, json=payload, timeout=30) + patch_response = http.patch(url, headers=self.headers, json=payload, timeout=30) if patch_response.status_code == 200: print(f" → Default variation set to '{default_variation_key}'") @@ -812,7 +819,7 @@ def update_targeting(self, project_key, config_key, targeting_data): "instructions": instructions } - response = requests.patch(url, headers=self.headers, json=payload, timeout=30) + response = http.patch(url, headers=self.headers, json=payload, timeout=30) if response.status_code == 200: print(f" Targeting rules updated for '{config_key}'") diff --git a/config_manager.py b/config_manager.py index 7fd77e1..4589e4d 100644 --- a/config_manager.py +++ b/config_manager.py @@ -6,6 +6,7 @@ import json from pathlib import Path import asyncio +import uuid import ldclient from launchdarkly_ai_server import ( get_client, @@ -25,58 +26,56 @@ class GraphTracker: - """Emits the graph events that the SDK used to emit for a hand-rolled walk. + """Emits the graph events for a hand-rolled walk of a resolved graph. - graph().invoke() records these itself, but this service traverses the graph - by hand through resolve_graph(), so nothing records them for it. The method - names match what agent_service already calls. - - The event keys are the CURRENT ones, which differ from the previous SDK: - - $ld:ai:graph:handoff -> handoff_success / handoff_failure - $ld:ai:graph:invocation -> invocation_success / invocation_failure - $ld:ai:graph:total -> total_tokens - $ld:ai:tool -> tool_call - $ld:ai:graph:path -> graph:node, one event per node entered - - Any LaunchDarkly metric keyed on the old names needs recreating against the - new ones. There is no replacement for the old graph:redirect event. + graph().invoke() records these itself, but this service walks the graph + by hand through resolve_graph(), so nothing records them for it. Event + names and payload fields match what the SDK's own runner sends, so the + graph and per-config monitoring views pick them up. """ def __init__(self, graph_key: str, context: dict): self._graph_key = graph_key - self._context = context - self._data = {"graphKey": graph_key} + self._context = ldclient.Context.from_dict(context) + self._data = {"runId": str(uuid.uuid4()), "configKey": graph_key, "graphKey": graph_key} self._nodes_entered = 0 - def _track(self, event: str, value=1, extra: dict | None = None): + def _send(self, event: str, data: dict, value=1): try: - data = {**self._data, **extra} if extra else self._data get_client().track(event, self._context, data, value) except Exception as e: log_debug(f"GRAPH TRACK ERROR ({event}): {e}") - def track_node_invocation(self, node_key: str): - """Record this node as it is entered. + def _track(self, event: str, value=1, extra: dict | None = None): + self._send(event, {**self._data, **(extra or {})}, value) - 0.2.4 added $ld:ai:graph:node for exactly this, and the ordered series - of these events is the path the walk took. Emitted on entry rather than - at the end so a node that then fails still leaves its step behind. - """ + def _node_data(self, node) -> dict: + config = node.config or {} + meta = node.meta or {} + return { + "runId": self._data["runId"], + "graphKey": self._graph_key, + "configKey": node.key, + "variationKey": meta.get("variationKey", ""), + "version": meta.get("version", 1), + "modelName": (config.get("model") or {}).get("name", ""), + "providerName": (config.get("provider") or {}).get("name", ""), + } + + def track_node_invocation(self, node_key: str): + """Record this node as it is entered; the ordered series is the path.""" log_debug(f"GRAPH: entering node {node_key}") - self._track( - "$ld:ai:graph:node", 1, {"nodeKey": node_key, "index": self._nodes_entered} - ) + self._track("$ld:ai:graph:node", 1, {"nodeKey": node_key, "index": self._nodes_entered}) self._nodes_entered += 1 def track_handoff_success(self, source_key: str, target_key: str): - self._track("$ld:ai:graph:handoff_success") + self._track("$ld:ai:graph:handoff_success", 1, {"sourceKey": source_key, "targetKey": target_key}) def track_handoff_failure(self, source_key: str, routing): - self._track("$ld:ai:graph:handoff_failure") + self._track("$ld:ai:graph:handoff_failure", 1, {"sourceKey": source_key, "targetKey": routing}) - def track_tool_call(self, node_key: str, tool_name: str): - self._track("$ld:ai:tool_call") + def track_tool_call(self, node, tool_name: str): + self._send("$ld:ai:tool_call", {**self._node_data(node), "toolKey": tool_name}) def track_invocation_success(self): self._track("$ld:ai:graph:invocation_success") @@ -84,63 +83,25 @@ def track_invocation_success(self): def track_invocation_failure(self): self._track("$ld:ai:graph:invocation_failure") - def track_node_success(self, node_key: str, config: dict): - self._track_generation("$ld:ai:generation:success", node_key, config, 1) - - def track_node_error(self, node_key: str, config: dict): - self._track_generation("$ld:ai:generation:error", node_key, config, 1) - - def _track_generation(self, event: str, node_key: str, config: dict, value): - model = (config or {}).get("model") or {} - data = { - "graphKey": self._graph_key, - "configKey": node_key, - "modelName": model.get("name", "unknown"), - "providerName": ((config or {}).get("provider") or {}).get("name", "unknown"), - } - try: - get_client().track(event, self._context, data, value) - except Exception as e: - log_debug(f"GRAPH TRACK ERROR ({event}): {e}") + def track_node_result(self, node, duration_ms: int, success: bool, usage: dict | None = None): + """Per-node duration, success or error, and tokens, as invoke() sends them.""" + data = self._node_data(node) + self._send("$ld:ai:duration:total", data, duration_ms) + self._send("$ld:ai:generation:success" if success else "$ld:ai:generation:error", data) + usage = usage or {} + total = usage.get("input", 0) + usage.get("output", 0) + if total: + self._send("$ld:ai:tokens:total", data, total) + self._send("$ld:ai:tokens:input", data, usage.get("input", 0)) + self._send("$ld:ai:tokens:output", data, usage.get("output", 0)) def track_latency(self, latency_ms: int): self._track("$ld:ai:graph:duration:total", latency_ms) - def track_node_duration(self, node_key: str, config: dict, duration_ms: int): - """Record one node's generation duration. - - The caller used to build this event by reaching into the tracker's - _ld_client and _context and reading five private attributes off the - node's config tracker. Configs are plain dicts now, so the model and - provider come from public keys instead. - """ - model = (config or {}).get("model") or {} - data = { - "graphKey": self._graph_key, - "configKey": node_key, - "modelName": model.get("name", "unknown"), - "providerName": ((config or {}).get("provider") or {}).get("name", "unknown"), - } - try: - get_client().track("$ld:ai:duration:total", self._context, data, duration_ms) - except Exception as e: - log_debug(f"GRAPH TRACK ERROR (duration): {e}") - def track_total_tokens(self, total: int): - """Total tokens across the walk. - - Takes an int. The previous tracker took a TokenUsage object; this event - carries a single numeric value. - """ self._track("$ld:ai:graph:total_tokens", total) - def track_path(self, path): - """No-op. The path is the series of $ld:ai:graph:node events. - Kept so the caller does not need to change; 0.2.4 retired the single - $ld:ai:graph:path event that this used to send. - """ - log_debug(f"GRAPH: path {' -> '.join(path)}") from dotenv import load_dotenv from utils.logger import log_student, log_debug import boto3 @@ -367,15 +328,8 @@ async def _ensure_ai_client(self): async def get_agent_graph(self, user_id: str, graph_key: str, user_context: dict = None): """Resolve an agent graph and a tracker for a hand-rolled traversal. - This method did not exist: agent_service called it but nothing defined - it, so the graph path raised AttributeError before any of this ran. It - is written here against resolve_graph(), which the SDK documents as the - path "for framework-native runners" -- i.e. callers that walk the graph - themselves, which is what agent_service does. - - resolve_graph returns topology only and records nothing, so the tracker - is ours. Returns (graph, tracker); the graph exposes `enabled`, `root`, - `edges_from`, and `reverse_traverse` as attributes. + resolve_graph() returns topology only and records nothing, so the + tracker is ours. Returns (graph, tracker). """ await self._ensure_ai_client() ld_user_context = self.build_context(user_id, user_context) @@ -384,23 +338,31 @@ async def get_agent_graph(self, user_id: str, graph_key: str, user_context: dict return graph, GraphTracker(graph_key, ld_user_context) + def clear_cache(self): + """No-op, kept because AgentService calls it on startup. + + Nothing is cached here: every get_config goes through inspect_config, + which evaluates against LaunchDarkly each time. + """ + return None + def flush(self): """Flush metrics and clear SDK cache""" self.ld_client.flush() - def clear_cache(self): - """Clear any cached configs (no-op for now, configs fetched live)""" - pass - - def track_feedback(self, context, thumbs_up: bool): + async def track_feedback(self, context, config_key: str, thumbs_up: bool): """Track user feedback with LaunchDarkly. - There is no tracker and no feedback API, so this emits the legacy event - directly. `context` replaces the tracker argument, because the event - has to land on the same context the config was evaluated with. + The AI SDK has no feedback API, so this emits the event directly on + the same context the config was evaluated with. Monitoring counts it + only when the event names the config and the variation that was served. """ try: - self.ld_client.track(FEEDBACK_EVENTS[bool(thumbs_up)], context, None, 1) + await self._ensure_ai_client() + meta = (await inspect_config(config_key, context))["meta"] or {} + data = {"configKey": config_key, "variationKey": meta.get("variationKey", ""), "version": meta.get("version", 1)} + ld_context = ldclient.Context.from_dict(context) + self.ld_client.track(FEEDBACK_EVENTS[bool(thumbs_up)], ld_context, data, 1) log_student(f"FEEDBACK TRACKED: {'👍 Positive' if thumbs_up else '👎 Negative'}") self.ld_client.flush() return True diff --git a/pyproject.toml b/pyproject.toml index 17c50b5..f8f40af 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "agents-demo" version = "0.1.0" -description = "LaunchDarkly AI Configs tutorial with LangGraph agents" +description = "LaunchDarkly AgentControl tutorial with LangGraph agents" requires-python = ">=3.12" dependencies = [ # Agent Framework @@ -12,9 +12,9 @@ dependencies = [ "fastapi>=0.115.0", "uvicorn[standard]>=0.32.0", "pydantic>=2.10.0", - # LaunchDarkly. The AI SDK is in open beta, so it is pinned exactly. - "launchdarkly-server-sdk>=9.0.0", - "launchdarkly-ai-server==0.2.4", + # LaunchDarkly + "launchdarkly-server-sdk>=9.18.4", + "launchdarkly-ai-server>=1.1.0", # AWS Bedrock Integration "langchain-aws>=0.2.0", "boto3>=1.35.0", diff --git a/tools/traffic_generator.py b/tools/traffic_generator.py index 7433899..111dd74 100755 --- a/tools/traffic_generator.py +++ b/tools/traffic_generator.py @@ -50,7 +50,7 @@ def analyze_knowledge_base(self): try: response = self.claude.messages.create( - model="claude-sonnet-4-20250514", + model="claude-haiku-5-5", max_tokens=800, messages=[{ "role": "user", @@ -107,7 +107,7 @@ def generate_query(self, topic, complexity, inject_pii=False): try: response = self.claude.messages.create( - model="claude-sonnet-4-20250514", + model="claude-haiku-5-5", max_tokens=150, messages=[{"role": "user", "content": prompt}] ) @@ -181,7 +181,7 @@ def evaluate_response(self, query, response): try: response = self.claude.messages.create( - model="claude-sonnet-4-20250514", + model="claude-haiku-5-5", max_tokens=10, messages=[{"role": "user", "content": prompt}], timeout=2 diff --git a/uv.lock b/uv.lock index 1341d21..3c16ca3 100644 --- a/uv.lock +++ b/uv.lock @@ -51,8 +51,8 @@ requires-dist = [ { name = "langchain-mistralai", specifier = ">=0.2.12" }, { name = "langchain-openai", specifier = ">=0.3.31" }, { name = "langgraph", specifier = ">=0.0.40" }, - { name = "launchdarkly-ai-server", specifier = "==0.2.4" }, - { name = "launchdarkly-server-sdk", specifier = ">=9.0.0" }, + { name = "launchdarkly-ai-server", specifier = ">=1.1.0" }, + { name = "launchdarkly-server-sdk", specifier = ">=9.18.4" }, { name = "numpy", specifier = ">=1.24.0" }, { name = "openai", specifier = ">=1.0.0" }, { name = "pydantic", specifier = ">=2.10.0" }, @@ -209,11 +209,11 @@ wheels = [ [[package]] name = "certifi" -version = "2026.2.25" +version = "2026.10.23" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/af/2d/7bf41579a8986e348fa033a31cdd0e4121114f6bce2457e8876010b092dd/certifi-2026.2.25.tar.gz", hash = "sha256:e887ab5cee78ea814d3472169153c2d12cd43b14bd03329a39a9c6e2e80bfba7", size = 155029, upload-time = "2026-02-25T02:54:17.342Z" } +sdist = { url = "https://files.pythonhosted.org/packages/fd/11/b524cbd9bbdaca58608e4cf4053fd463417549e1959fa8d3aa18319f9555/certifi-2026.10.23.tar.gz", hash = "sha256:a9895e6e2758b371e0545e321a3a8fd1fcfd9829ada8824a936dfb16aaaf36cd", size = 136225, upload-time = "2026-10-23T11:36:16.478Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/9a/3c/c17fb3ca2d9c3acff52e30b309f538586f9f5b9c9cf454f3845fc9af4881/certifi-2026.2.25-py3-none-any.whl", hash = "sha256:027692e4402ad994f1c42e52a4997a9763c646b73e4096e4d5d6db8af1d6f0fa", size = 153684, upload-time = "2026-02-25T02:54:15.766Z" }, + { url = "https://files.pythonhosted.org/packages/32/d1/a3652fe2c19134d0d15922177821d863cbd7e842d53a21bbe7e8e3a1b5ac/certifi-2026.10.23-py3-none-any.whl", hash = "sha256:e9b54de76e530bb6cf0ccd036787103acb58fd42ba930ea8bf948ddbaa2f61d1", size = 135082, upload-time = "2026-10-23T11:36:14.763Z" }, ] [[package]] @@ -312,15 +312,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/55/e2/2537ebcff11c1ee1ff17d8d0b6f4db75873e3b0fb32c2d4a2ee31ecb310a/docstring_parser-0.17.0-py3-none-any.whl", hash = "sha256:cf2569abd23dce8099b300f9b4fa8191e9582dda731fd533daf54c4551658708", size = 36896, upload-time = "2025-07-21T07:35:00.684Z" }, ] -[[package]] -name = "expiringdict" -version = "1.2.2" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/fc/62/c2af4ebce24c379b949de69d49e3ba97c7e9c9775dc74d18307afa8618b7/expiringdict-1.2.2.tar.gz", hash = "sha256:300fb92a7e98f15b05cf9a856c1415b3bc4f2e132be07daa326da6414c23ee09", size = 8137, upload-time = "2022-06-21T09:12:30.415Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/cb/84/a04c59324445f4bcc98dc05b39a1cd07c242dde643c1a3c21e4f7beaf2f2/expiringdict-1.2.2-py3-none-any.whl", hash = "sha256:09a5d20bc361163e6432a874edd3179676e935eb81b925eccef48d409a8a45e8", size = 8456, upload-time = "2022-06-21T09:12:28.652Z" }, -] - [[package]] name = "faiss-cpu" version = "1.13.2" @@ -854,43 +845,42 @@ wheels = [ [[package]] name = "launchdarkly-ai-server" -version = "0.2.4" +version = "1.1.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "opentelemetry-api" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/77/ba/ae8af286682bb054e6e35af6ea0459832246e61e7ceb1578748518260b0d/launchdarkly_ai_server-0.2.4.tar.gz", hash = "sha256:8f20ff80811c530a98f54e2e1fa8e3f24d3b599ceae45b023bae72c8b517f80e", size = 161860, upload-time = "2026-09-30T23:30:42.274Z" } +sdist = { url = "https://files.pythonhosted.org/packages/bc/de/5ac3b740979de7b65d9f1f66eb5ac36a705617da50e45e9bc40e4fa2cee5/launchdarkly_ai_server-1.1.0.tar.gz", hash = "sha256:579c5fefba26c4469fce5085d956bfd95f9665c89fe011b1062cd4439652c1dd", size = 527963, upload-time = "2026-11-12T20:32:30.265Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/f3/0a/dbe2090ab16bb2aeba7c27d86c9ae11d922ba852d6a91392db2cb556931c/launchdarkly_ai_server-0.2.4-py3-none-any.whl", hash = "sha256:d504671564c28eaca3e72ed3b74c00f1f461b730265af56e2d6b9d321177398c", size = 98988, upload-time = "2026-09-30T23:30:41.094Z" }, + { url = "https://files.pythonhosted.org/packages/5f/59/5a633e57fcb379a853d8d827acf9023699ff0d6501ef587df994879db456/launchdarkly_ai_server-1.1.0-py3-none-any.whl", hash = "sha256:c905b992dca4d1b28be594ae19f166a87c13b9d5fb68381227d47110dacc713f", size = 232643, upload-time = "2026-11-12T20:32:29.111Z" }, ] [[package]] name = "launchdarkly-eventsource" -version = "1.5.1" +version = "1.7.4" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "urllib3" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/1a/77/f4ec64fb2e4d72a3a261f741cd3ef3bbd8cb22760c471f04366a1bc98100/launchdarkly_eventsource-1.5.1.tar.gz", hash = "sha256:f122f80b36db6ea1ab20af62c82b8b2668682259b415053c94400dd6c07922a7", size = 25583, upload-time = "2026-01-23T17:35:39.462Z" } +sdist = { url = "https://files.pythonhosted.org/packages/ac/6c/60862f8143c8185e953410b30125ff37ce4720fac2042771ca00f115f840/launchdarkly_eventsource-1.7.4.tar.gz", hash = "sha256:0a608da152a53bd05f5b4a2486828f21d48cd25a56986e36a8e47a8e9975e309", size = 46060, upload-time = "2026-10-19T15:27:17.989Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/54/c6/c0816382050a97ebf0e4590e0adf93a317e7e64333eed4467b1081b261d7/launchdarkly_eventsource-1.5.1-py3-none-any.whl", hash = "sha256:43dfbc14a3962c9bce252320d690cdcbfda0ca00501226d517ae77e60f570d44", size = 33964, upload-time = "2026-01-23T17:35:38.386Z" }, + { url = "https://files.pythonhosted.org/packages/8c/e3/6dae165ff56bba3ad4fc76b2aa8c4606c577d2e33a9053dc147b03b045b6/launchdarkly_eventsource-1.7.4-py3-none-any.whl", hash = "sha256:42bbaee1741675199be193d99229ecb710a94089e74fc68b8c4edb90cddbdc5e", size = 29560, upload-time = "2026-10-19T15:27:16.988Z" }, ] [[package]] name = "launchdarkly-server-sdk" -version = "9.15.0" +version = "9.21.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "certifi" }, - { name = "expiringdict" }, { name = "launchdarkly-eventsource" }, { name = "pyrfc3339" }, { name = "semver" }, { name = "urllib3" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/ae/37/af129bb02cb903c949284e7173d7c5539e75f188cac0b94d502c4549b969/launchdarkly_server_sdk-9.15.0.tar.gz", hash = "sha256:f31441b74bc1a69c381db57c33116509e407a2612628ad6dff0a7dbb39d5020b", size = 218233, upload-time = "2026-02-10T17:36:00.329Z" } +sdist = { url = "https://files.pythonhosted.org/packages/d6/63/d71b230ed98354523c3bba9950b1498a74c1824c39f425400a0cd27b8841/launchdarkly_server_sdk-9.21.0.tar.gz", hash = "sha256:c1db1ebcc5045b3785bd169e780f521a625f5201382dca7cbe85fd871a4103c8", size = 518639, upload-time = "2026-11-12T21:45:44.315Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/79/0e/fb5954448bcdef93475d14d2500edd9730c6d7dc02a3bb9732c602ac2981/launchdarkly_server_sdk-9.15.0-py3-none-any.whl", hash = "sha256:c267e29bfa3fb5e2a06a208448ada6ed5557a2924979b8d79c970b45d227c668", size = 293564, upload-time = "2026-02-10T17:35:58.824Z" }, + { url = "https://files.pythonhosted.org/packages/57/df/9c22e54b59b1c64bd5b4a5880d4f00aa92448fc0da16493e86090470739e/launchdarkly_server_sdk-9.21.0-py3-none-any.whl", hash = "sha256:ce87d00caa655c5ebb9a2656e65432c64c47529f5df588513043fe9d4fd46afe", size = 324888, upload-time = "2026-11-12T21:45:43.152Z" }, ] [[package]] From b223ef29ec49e7c8cb60ba8487bff846417f0751 Mon Sep 17 00:00:00 2001 From: Scarlett Attensil Date: Wed, 18 Nov 2026 12:21:19 -0800 Subject: [PATCH 04/12] Stop the graph walk when a node fails. A failed security agent used to fall through to the first edge, which sent the unredacted message on to the support agent. Any node error now ends the walk and returns an error, and the invocation is recorded as a failure. --- api/services/agent_service.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/services/agent_service.py b/api/services/agent_service.py index 7c9bf3a..94c984c 100644 --- a/api/services/agent_service.py +++ b/api/services/agent_service.py @@ -127,6 +127,10 @@ async def execute_with_graph( for tool_name in result.get("tool_calls") or []: graph_tracker.track_tool_call(current_node, tool_name) + # Fail closed: following an edge after a failed security check would pass the raw PII on. + if result.get("_error"): + raise RuntimeError(f"{node_key} failed: {result['_error']}") + # Update context with results (generic) self._update_context(node_key, config, result, ctx, current_node.meta) From 3d58537b5a7a1ed9f9907ccb16d4a8ec01beacb4 Mon Sep 17 00:00:00 2001 From: Scarlett Attensil Date: Wed, 18 Nov 2026 14:37:34 -0800 Subject: [PATCH 05/12] Fail closed on missing redaction and send custom parameters. A node reached through a sanitize handoff now has to return redacted text, or the walk stops instead of passing the raw input on. Bootstrap sends each variation's customParameters as model.custom, so max_tool_calls from the manifest reaches the agents. The per-config fallback, the defaults file and the old agent wrapper had no callers on the graph path, so they are gone. The README lists the files that exist. --- .ai_config_defaults.json | 42 ------ README.md | 8 +- agents/ld_agent_helpers.py | 233 +--------------------------------- api/services/agent_service.py | 8 ++ bootstrap/create_configs.py | 4 + config_manager.py | 127 +----------------- 6 files changed, 18 insertions(+), 404 deletions(-) delete mode 100644 .ai_config_defaults.json diff --git a/.ai_config_defaults.json b/.ai_config_defaults.json deleted file mode 100644 index 2abaa69..0000000 --- a/.ai_config_defaults.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "_metadata": { - "environment": "production", - "generated_at": "2026-04-10", - "source": "bootstrap/ai_config_manifest.yaml" - }, - "configs": { - "supervisor-agent": { - "enabled": true, - "model": { - "name": "unknown", - "parameters": {} - }, - "provider": { - "name": "unknown" - }, - "instructions": "You are a routing supervisor. Analyze user input for PII and route accordingly.\n\nRoute to \"security\" if the text contains:\n- Email addresses, phone numbers, physical addresses\n- Names, SSNs, credit card numbers, account numbers\n- Any personally identifiable information\n\nRoute to \"support\" if the text is:\n- General questions without personal details\n- Technical queries, product questions\n\nIMPORTANT: You must respond with ONLY a JSON object in this exact format:\n{\"route\": \"security\"} or {\"route\": \"support\"}\n\nDo not include any other text, explanation, or formatting. Just the JSON object.\n" - }, - "security-agent": { - "enabled": true, - "model": { - "name": "unknown", - "parameters": {} - }, - "provider": { - "name": "unknown" - }, - "instructions": "You are a privacy agent that REMOVES PII and formats the input for another process. Analyze the input text and identify any personally identifiable information including: Email addresses, Phone numbers, Social Security Numbers, Names (first, last, full names), Physical addresses, Credit card numbers, Driver's license numbers, Any other sensitive personal data.\n\nRespond with:\n- detected: true if any PII was found, false otherwise\n- types: array of PII types found (e.g., ['email', 'name', 'phone'])\n- redacted: the input text with PII replaced by [REDACTED], keeping the text readable and natural\n\nExamples:\nInput: 'My email is john@company.com and I need help'\nOutput: detected=true, types=['email'], redacted='My email is [REDACTED] and I need help'\n\nInput: 'I need help with my account'\nOutput: detected=false, types=[], redacted='I need help with my account'\n\nInput: 'My name is Sarah Johnson and my phone is 555-1234'\nOutput: detected=true, types=['name', 'phone'], redacted='My name is [REDACTED] and my phone is [REDACTED]'\n\nBe thorough in your analysis and err on the side of caution when identifying potential PII.\n" - }, - "support-agent": { - "enabled": true, - "model": { - "name": "unknown", - "parameters": {} - }, - "provider": { - "name": "unknown" - }, - "instructions": "You are Umbra's support assistant. Umbra is a cloud deployment platform for developers.\n\nUse your search tools to find accurate information from Umbra's documentation before answering questions about:\n- Refund policies and billing\n- Deployment regions and availability\n- Account management and subscriptions\n- Features, limits, and pricing tiers\n- Troubleshooting common issues\n\nIMPORTANT: Only answer based on information found in the documentation. If you cannot find relevant information, say so clearly. Never make up policies or features.\n\nWhen citing sources, mention the document name (e.g., \"According to Umbra's Account Management documentation...\") but do NOT generate markdown links or URLs.\n" - } - } -} \ No newline at end of file diff --git a/README.md b/README.md index f1d8be5..e4e90a5 100644 --- a/README.md +++ b/README.md @@ -41,10 +41,8 @@ Open http://localhost:8501 ### Agents | File | Purpose | |------|---------| -| `agents/supervisor_agent.py` | Routes requests based on PII likelihood (uses an AgentControl config) | -| `agents/security_agent.py` | Detects and redacts PII (uses an AgentControl config) | -| `agents/support_agent.py` | Answers questions with tools (uses an AgentControl config + tools) | -| `agents/ld_agent_helpers.py` | Shared helpers - model creation, metric tracking | +| `agents/generic_agent.py` | Runs any graph node (supervisor, security, support) from its AgentControl config and tools | +| `agents/ld_agent_helpers.py` | Shared helpers - model creation, tool call limits | ### Tools | File | Purpose | @@ -78,7 +76,7 @@ Open http://localhost:8501 ┌─────────────────────────────────────────────────────────────┐ │ config_manager.py │ │ • get_agent_graph() → fetches graph topology │ -│ • get_config() → fetches the config for each agent │ +│ • track_feedback() → sends thumbs up/down events │ │ • Handles targeting based on user context │ └─────────────────────────────────────────────────────────────┘ │ diff --git a/agents/ld_agent_helpers.py b/agents/ld_agent_helpers.py index 47dcc56..45b835e 100644 --- a/agents/ld_agent_helpers.py +++ b/agents/ld_agent_helpers.py @@ -1,10 +1,8 @@ """LaunchDarkly AI agent helpers - model creation and metric tracking.""" -import asyncio import time import os -from typing import List, Any, Tuple +from typing import Any from langchain.chat_models import init_chat_model -from langgraph.prebuilt import create_react_agent from utils.logger import log_student from langchain_aws import ChatBedrockConverse from langchain_core.tools import StructuredTool @@ -98,19 +96,6 @@ def create_model_for_config(provider: str, model: str, config_manager): return init_chat_model(model=model, model_provider=langchain_provider) -def extract_token_usage(response) -> dict: - """Extract token usage from LLM response.""" - if isinstance(response, dict) and "raw" in response and hasattr(response["raw"], "usage_metadata"): - usage = response["raw"].usage_metadata - if usage: - return { - "input": usage.get("input_tokens", 0), - "output": usage.get("output_tokens", 0), - "total": usage.get("total_tokens", 0) - } - return {"input": 0, "output": 0, "total": 0} - - def wrap_tool_with_counter(tool: Any, counter: ToolCallCounter) -> StructuredTool: """Wrap a tool to track and limit invocations.""" original_run = tool._run if hasattr(tool, '_run') else None @@ -141,219 +126,3 @@ async def counted_arun(**kwargs) -> str: coroutine=counted_arun if original_arun or original_run else None, args_schema=tool.args_schema if hasattr(tool, 'args_schema') else None ) - - -async def collect_langgraph_usage_async(coro, prev_message_count=0): - """Run an agent invocation and attach its token usage to the result. - - This was track_langgraph_metrics_async, which took a tracker and emitted - duration, success, tokens, and error itself. There is no tracker any more, - and the caller that owns the graph tracker emits those events, so this only - measures and reports. - - The duration is logged rather than emitted for the same reason: emitting it - here as well as in the traversal is what double-counted it before. - """ - start_time = time.time() - result = await coro - duration_ms = int((time.time() - start_time) * 1000) - log_student(f"AGENT: duration={duration_ms}ms") - - # Extract tokens from new messages - total_in, total_out, total = 0, 0, 0 - if "messages" in result: - for msg in result['messages'][prev_message_count:]: - if hasattr(msg, "usage_metadata") and msg.usage_metadata: - usage = msg.usage_metadata - total_in += usage.get("input_tokens", 0) - total_out += usage.get("output_tokens", 0) - total += usage.get("total_tokens", 0) - - if total > 0: - log_student(f"AGENT TOKENS: {total} ({total_in} in, {total_out} out)") - - result["_token_usage"] = {"input": total_in, "output": total_out, "total": total} - return result - - -async def create_agent_with_fresh_config( - config_manager, - config_key: str, - user_id: str, - user_context: dict, - tools: List[Any] = None -) -> Tuple[Any, Any, bool, int]: - """Create LangChain agent with fresh LaunchDarkly config.""" - tools = tools or [] - - try: - config = await config_manager.get_config( - user_id=user_id, - config_key=config_key, - user_context=user_context - ) - - if not config.enabled: - return None, None, True, 25 - - # Create model - from utils.bedrock_helpers import normalize_bedrock_provider - # Configs are plain dicts now. - provider_name = (config.get("provider") or {}).get("name") or "" - model_cfg = config.get("model") or {} - normalized = normalize_bedrock_provider(provider_name) - langchain_provider = map_provider_to_langchain(normalized) - - if langchain_provider == 'bedrock' and os.getenv('AUTH_METHOD', '').lower() == 'sso': - if not hasattr(config_manager, 'boto3_session') or not config_manager.boto3_session: - raise ValueError("Bedrock SSO requires AWS session. Run: aws sso login") - llm = create_bedrock_chat_model( - model_id=model_cfg.get("name"), - session=config_manager.boto3_session, - region=config_manager.aws_region - ) - log_student(f"ROUTING: Bedrock SSO - {model_cfg.get('name')}") - else: - fallback = 'anthropic' if provider_name.lower() == 'anthropic' else langchain_provider - llm = init_chat_model(model=model_cfg.get("name"), model_provider=fallback) - log_student(f"ROUTING: {fallback} - {model_cfg.get('name')}") - - # Get max_tool_calls from config - max_tool_calls = 5 - # model.custom is a public key now; to_dict() is gone. - custom = model_cfg.get('custom') or {} - if 'max_tool_calls' in custom: - max_tool_calls = int(custom['max_tool_calls']) - - # Wrap tools with counter - counter = ToolCallCounter(max_calls=max_tool_calls) - wrapped_tools = [wrap_tool_with_counter(t, counter) for t in tools] - recursion_limit = max_tool_calls * 3 + 10 - - log_student(f"CONFIG: max_tool_calls={max_tool_calls}, recursion_limit={recursion_limit}") - - agent = create_react_agent( - model=llm, - tools=wrapped_tools, - prompt=config.get("instructions") - ) - - # The second element was config.tracker. There is no tracker, and the - # caller emits this node's events, so the config is returned instead. - return agent, config, False, recursion_limit - - except Exception as e: - log_student(f"ERROR creating agent: {e}") - return None, None, True, 25 - - -def create_simple_agent_wrapper(config_manager, config_key: str, tools: List[Any] = None, graph_node_config=None): - """Create agent wrapper that fetches fresh config on each invocation.""" - tools = tools or [] - - class LaunchDarklyAgent: - async def ainvoke(self, request_data: dict) -> dict: - user_input = request_data.get("user_input", "") - user_id = request_data.get("user_id", "agent_user") - user_context = request_data.get("user_context", {}) - messages = request_data.get("messages", []) - - try: - agent, tracker, disabled, recursion_limit = await create_agent_with_fresh_config( - config_manager=config_manager, - config_key=config_key, - user_id=user_id, - user_context=user_context, - tools=tools - ) - - if disabled: - log_student(f"{config_key}: disabled") - return { - "user_input": user_input, - "response": f"AI Config {config_key} is disabled", - "tool_calls": [], "tool_details": [], "messages": [] - } - - # Prepare messages - if not messages: - from langchain_core.messages import HumanMessage - messages = [HumanMessage(content=user_input)] - - initial_state = {"messages": messages} - prev_count = len(messages) - - _rate_limit_llm_call() - - try: - response = await collect_langgraph_usage_async( - agent.ainvoke(initial_state, {"recursion_limit": recursion_limit}), - prev_count - ) - except MaxToolCallsExceeded as e: - log_student(f"TOOL LIMIT: {e}") - return { - "user_input": user_input, - "response": f"Tool call limit reached. {str(e)}", - "tool_calls": [], "tool_details": [], "messages": [] - } - - # Parse response - new_messages = response['messages'][prev_count:] - ai_response = "" - tool_calls = [] - tool_details = [] - - for msg in new_messages: - if hasattr(msg, 'content') and msg.content: - if isinstance(msg.content, list): - for item in msg.content: - if hasattr(item, 'text'): - ai_response += item.text + " " - else: - ai_response += str(msg.content) + " " - - if hasattr(msg, 'tool_calls') and msg.tool_calls: - for tc in msg.tool_calls: - name = tc.get('name') if isinstance(tc, dict) else getattr(tc, 'name', None) - if name: - tool_calls.append(name) - args = tc.get('args', {}) if isinstance(tc, dict) else getattr(tc, 'args', {}) - tool_details.append({"name": name, "args": args}) - - return { - "user_input": user_input, - "response": ai_response.strip() or "I understand. Let me help you.", - "tool_calls": tool_calls, - "tool_details": tool_details, - "messages": response['messages'], - "_token_usage": response.get("_token_usage", {"input": 0, "output": 0, "total": 0}) - } - - except Exception as e: - log_student(f"ERROR in {config_key}: {e}") - return { - "user_input": user_input, - "response": f"Error: {e}", - "tool_calls": [], "tool_details": [], "messages": [] - } - - def invoke(self, request_data: dict) -> dict: - """Sync wrapper for async invocation.""" - try: - try: - asyncio.get_running_loop() - import concurrent.futures - with concurrent.futures.ThreadPoolExecutor() as executor: - future = executor.submit(asyncio.run, self.ainvoke(request_data)) - return future.result() - except RuntimeError: - return asyncio.run(self.ainvoke(request_data)) - except Exception as e: - return { - "user_input": request_data.get("user_input", ""), - "response": f"Error: {e}", - "tool_calls": [], "tool_details": [], "messages": [] - } - - return LaunchDarklyAgent() diff --git a/api/services/agent_service.py b/api/services/agent_service.py index 94c984c..7dc147c 100644 --- a/api/services/agent_service.py +++ b/api/services/agent_service.py @@ -81,6 +81,7 @@ async def execute_with_graph( prev_node_key = None visited = set() hop_count = 0 + must_redact = False # Traverse until terminal node while current_node: @@ -130,6 +131,9 @@ async def execute_with_graph( # Fail closed: following an edge after a failed security check would pass the raw PII on. if result.get("_error"): raise RuntimeError(f"{node_key} failed: {result['_error']}") + # Same for a sanitize handoff that came back without redacted text. + if must_redact and not result.get("redacted"): + raise RuntimeError(f"{node_key} returned no redacted text") # Update context with results (generic) self._update_context(node_key, config, result, ctx, current_node.meta) @@ -140,6 +144,10 @@ async def execute_with_graph( break next_node = self._select_next_node(edges, result, nodes, graph_tracker, source_key=node_key) + must_redact = next_node is not None and any( + e.target_key == next_node.key and (e.handoff or {}).get("action") == "sanitize" + for e in edges + ) prev_node_key = node_key current_node = next_node diff --git a/bootstrap/create_configs.py b/bootstrap/create_configs.py index 74f542e..46b998f 100644 --- a/bootstrap/create_configs.py +++ b/bootstrap/create_configs.py @@ -257,6 +257,10 @@ def create_variation(self, project_key, config_key, variation_data): payload["modelConfigKey"] = model_config_key print(f" Using modelConfigKey: {model_config_key}") + # Custom parameters such as max_tool_calls live in the variation's model.custom + if variation_data.get("customParameters"): + payload["model"] = {"custom": variation_data["customParameters"]} + response = http.post(url, headers=self.headers, json=payload, timeout=30) if response.status_code in [200, 201]: diff --git a/config_manager.py b/config_manager.py index 4589e4d..66f51d8 100644 --- a/config_manager.py +++ b/config_manager.py @@ -3,16 +3,12 @@ Simplified ConfigManager for LaunchDarkly AI Agent integration """ import os -import json -from pathlib import Path -import asyncio import uuid import ldclient from launchdarkly_ai_server import ( get_client, init_client, inspect_config, - parse_ai_config, resolve_graph, ) @@ -115,92 +111,11 @@ def __init__(self): if not self.sdk_key: raise ValueError("LD_SDK_KEY environment variable is required") - # Load defaults from .ai_config_defaults.json - self._load_config_defaults() - self._initialize_launchdarkly_client() # Initialize AWS Bedrock session for SSO authentication self._initialize_bedrock_session() - def _load_config_defaults(self): - """Load AI config defaults from .ai_config_defaults.json - - This file contains fallback configs used when LaunchDarkly is unavailable. - It's created by the bootstrap script: python bootstrap/create_configs.py - """ - defaults_path = Path(".ai_config_defaults.json") - - if not defaults_path.exists(): - raise FileNotFoundError( - ".ai_config_defaults.json not found!\n\n" - "Run the bootstrap script to create AI Configs and generate this file:\n" - " python bootstrap/create_configs.py" - ) - - try: - with open(defaults_path, 'r') as f: - data = json.load(f) - - self.config_defaults = data.get("configs", {}) - metadata = data.get("_metadata", {}) - - log_debug(f"DEFAULTS: Loaded {len(self.config_defaults)} config defaults from {metadata.get('environment', 'unknown')}") - log_debug(f"DEFAULTS: Generated at {metadata.get('generated_at', 'unknown')}") - - except json.JSONDecodeError as e: - raise ValueError( - f"Failed to parse .ai_config_defaults.json: {e}\n\n" - "The file may be corrupted. Regenerate it by running:\n" - " python bootstrap/create_configs.py" - ) - - def _get_default_config(self, config_key: str) -> dict: - """Get fallback config from .ai_config_defaults.json - - Args: - config_key: The AI config key (e.g., 'support-agent') - - Returns: - A dict in the shape the SDK serves, validated by parse_ai_config - - Raises: - ValueError: If config key not found in defaults - """ - if config_key not in self.config_defaults: - available_keys = list(self.config_defaults.keys()) - raise ValueError( - f"Config '{config_key}' not found in .ai_config_defaults.json!\n\n" - f"Available configs: {', '.join(available_keys)}\n\n" - "To add this config, create it in LaunchDarkly and run:\n" - " python bootstrap/create_configs.py" - ) - - config_data = self.config_defaults[config_key] - - # Configs are plain dicts now, so this shape is what the SDK serves - # rather than an AIAgentConfigDefault. Tools are managed by - # LaunchDarkly and not part of defaults. - candidate = { - "model": { - "name": config_data["model"]["name"], - "parameters": config_data["model"].get("parameters", {}), - }, - "provider": {"name": config_data["provider"]["name"]}, - "instructions": config_data.get("instructions", "You are a helpful assistant."), - } - - # Validated rather than trusted: a stale defaults file should fail - # loudly here instead of being served to a model. - result = parse_ai_config(candidate) - if not result.success: - raise ValueError( - f"Fallback config '{config_key}' in .ai_config_defaults.json is not valid: " - f"{result.error.get('message')}\n\nRegenerate it with:\n" - " python bootstrap/create_configs.py" - ) - return result.data - def _initialize_launchdarkly_client(self): """Initialize LaunchDarkly client and hand it to the AI SDK""" config = ldclient.Config(self.sdk_key) @@ -281,44 +196,6 @@ def build_context(self, user_id: str, user_context: dict = None) -> dict: return context - async def get_config(self, user_id: str, config_key: str = None, user_context: dict = None): - """Get LaunchDarkly AI Config with fallback to .ai_config_defaults.json - - Fallback chain: - 1. Try LaunchDarkly (live config with targeting) - 2. If that fails, use .ai_config_defaults.json (validated production defaults) - 3. If config not in defaults file, raise helpful error - """ - log_debug(f"CONFIG MANAGER: Getting config for user_id={user_id}, config_key={config_key}") - log_debug(f"CONFIG MANAGER: User context: {user_context}") - - # Build context using centralized method - ld_user_context = self.build_context(user_id, user_context) - log_debug(f"CONFIG MANAGER: Built LaunchDarkly context: {ld_user_context}") - - ai_config_key = config_key or os.getenv('LAUNCHDARKLY_AI_CONFIG_KEY', 'support-agent') - log_debug(f"CONFIG MANAGER: Using AI config key: {ai_config_key}") - - await self._ensure_ai_client() - - # There is no `default=` parameter on this SDK, so the fallback is - # applied here. inspect_config never raises and reports enabled=False - # on any failure, which keeps this to one branch. - inspected = await inspect_config(ai_config_key, ld_user_context) - - if inspected["enabled"] and inspected["config"]: - config = inspected["config"] - meta = inspected["meta"] or {} - log_debug("CONFIG MANAGER: ✅ Got config from LaunchDarkly") - log_debug(f"CONFIG MANAGER: Model: {(config.get('model') or {}).get('name', 'unknown')}") - # The variation key is public metadata now, not a private tracker - # attribute read behind a hasattr guard. - log_debug(f"CONFIG MANAGER: Variation: {meta.get('variationKey', 'unknown')}") - return config - - log_student(f"CONFIG MANAGER: '{ai_config_key}' not served, using .ai_config_defaults.json") - return self._get_default_config(ai_config_key) - async def _ensure_ai_client(self): """Hand the existing client to the AI SDK. Idempotent.""" # client= is keyword-only in effect: a positional argument is read as @@ -341,8 +218,8 @@ async def get_agent_graph(self, user_id: str, graph_key: str, user_context: dict def clear_cache(self): """No-op, kept because AgentService calls it on startup. - Nothing is cached here: every get_config goes through inspect_config, - which evaluates against LaunchDarkly each time. + Nothing is cached here: every graph and config is evaluated against + LaunchDarkly on each request. """ return None From e9bc5785be050ddf556feea49614853db6f763de Mon Sep 17 00:00:00 2001 From: Scarlett Attensil Date: Wed, 18 Nov 2026 14:43:11 -0800 Subject: [PATCH 06/12] Return a reached tool limit as an answer, not a node error. Now that max_tool_calls reaches the agents, the free tier hits its limit of 3. Raising there stopped the graph walk and counted a generation error. --- agents/generic_agent.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/agents/generic_agent.py b/agents/generic_agent.py index 935e8fd..3204121 100644 --- a/agents/generic_agent.py +++ b/agents/generic_agent.py @@ -22,7 +22,7 @@ def create_generic_agent(agent_config, config_manager, valid_routes: List[str] = """ from agents.ld_agent_helpers import ( create_model_for_config, _rate_limit_llm_call, - wrap_tool_with_counter, ToolCallCounter + wrap_tool_with_counter, ToolCallCounter, MaxToolCallsExceeded ) from tools_impl.dynamic_tool_factory import create_dynamic_tools_from_launchdarkly import time @@ -94,6 +94,10 @@ async def ainvoke(self, state: dict) -> dict: return result + except MaxToolCallsExceeded as e: + # The configured limit doing its job, not a failed generation. + log_student(f"TOOL LIMIT: {e}") + return {"response": f"Tool call limit reached. {e}"} except Exception as e: log_student(f"AGENT ERROR: {e}") return { From 632238047b97c9beafc5383f3ce9406e6f8c248b Mon Sep 17 00:00:00 2001 From: Scarlett Attensil Date: Wed, 18 Nov 2026 15:32:07 -0800 Subject: [PATCH 07/12] Fail closed on an unparsable route and keep the client open on flush --- api/services/agent_service.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/api/services/agent_service.py b/api/services/agent_service.py index 7dc147c..b09d040 100644 --- a/api/services/agent_service.py +++ b/api/services/agent_service.py @@ -181,12 +181,13 @@ def _select_next_node(self, edges, result: dict, nodes: dict, graph_tracker=None target = route_map[routing] log_student(f" MATCHED: routing='{routing}' → {target}") return nodes.get(target) - elif routing: + if route_map: log_student(f" UNRECOGNIZED ROUTE: '{routing}' not in {list(route_map.keys())}") if graph_tracker: graph_tracker.track_handoff_failure(source_key, routing) + raise ValueError(f"{source_key} chose no valid route: {routing!r}") - # Default: first edge (fallback) + # Edges without routes hand off to the first target if edges: default = edges[0].target_key log_student(f" DEFAULT: → {default}") @@ -258,7 +259,7 @@ def __init__(self): self.graph_executor = AgentGraphExecutor(self.config_manager) def flush_metrics(self): - self.config_manager.close() + self.config_manager.flush() async def process_message( self, From b30f7f5ec0d4f38fdf64d0e8cf1402077b415da6 Mon Sep 17 00:00:00 2001 From: Scarlett Attensil Date: Wed, 18 Nov 2026 15:43:04 -0800 Subject: [PATCH 08/12] Set default LD_PROJECT_KEY to offline-evals-tutorial in .env.example --- .env.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 1d63dc9..eb8405d 100644 --- a/.env.example +++ b/.env.example @@ -2,7 +2,7 @@ # Get your SDK key from: https://app.launchdarkly.com/settings/projects LD_SDK_KEY=your_launchdarkly_sdk_key_here LD_API_KEY=your_launchdarkly_api_key_here -LD_PROJECT_KEY=agent-graphs-tutorial +LD_PROJECT_KEY=offline-evals-tutorial # ============================================ # Authentication Method Selection From 8efdce343d3b57e81e1403bc75aafc0fac02531e Mon Sep 17 00:00:00 2001 From: Scarlett Attensil Date: Thu, 19 Nov 2026 09:22:34 -0800 Subject: [PATCH 09/12] Add provider signup links and SDK key bootstrap order to README --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e4e90a5..49ec92f 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,24 @@ Demo application for the [Agent Graphs tutorial](https://docs.launchdarkly.com/tutorials/agent-graphs). +## Prerequisites + +- **Python 3.12+** with [`uv`](https://docs.astral.sh/uv/getting-started/installation/) +- **LaunchDarkly account** ([sign up for free](https://app.launchdarkly.com/signup)) and a **Writer API access token** (`LD_API_KEY`, created under **Settings → Authorization → Create token**) +- **OpenAI API key** ([platform.openai.com/api-keys](https://platform.openai.com/api-keys)) +- **Anthropic API key** ([console.anthropic.com/settings/keys](https://console.anthropic.com/settings/keys)) +- **Mistral API key** ([console.mistral.ai](https://console.mistral.ai/), optional, used for EU security routing) + ## Quick Start ```bash cp .env.example .env -# Add your LD_SDK_KEY and API keys to .env +# 1. Add LD_API_KEY, OPENAI_API_KEY, and ANTHROPIC_API_KEY (plus optional MISTRAL_API_KEY) to .env uv sync uv run python initialize_embeddings.py --force (cd bootstrap && uv run python create_configs.py) +# 2. Copy the Production SDK key printed by create_configs.py into LD_SDK_KEY in .env # Terminal 1 uv run uvicorn api.main:app --reload --port 8000 From 63f85ccfc14b7a18c1cec2c48d10edccceb9c4d2 Mon Sep 17 00:00:00 2001 From: Scarlett Attensil Date: Fri, 20 Nov 2026 09:51:50 -0800 Subject: [PATCH 10/12] Address PR #30 review feedback Co-authored-by: Cursor --- .gitignore | 3 +- README.md | 22 +-- agents/generic_agent.py | 2 +- agents/ld_agent_helpers.py | 16 +- api/main.py | 22 ++- api/models.py | 3 + api/services/agent_service.py | 25 ++- bootstrap/create_configs.py | 2 + config_manager.py | 94 +++++++---- pyproject.toml | 5 + tests/test_review_fixes.py | 256 +++++++++++++++++++++++++++++ tools/traffic_generator.py | 6 +- tools_impl/dynamic_tool_factory.py | 89 ++++++---- ui/chat_interface.py | 40 +++-- 14 files changed, 476 insertions(+), 109 deletions(-) create mode 100644 tests/test_review_fixes.py diff --git a/.gitignore b/.gitignore index 2735637..cedcd3a 100644 --- a/.gitignore +++ b/.gitignore @@ -41,8 +41,7 @@ env/ ehthumbs.db Thumbs.db -# Tests -tests/ +.pytest_cache/ # Documentation docs/ diff --git a/README.md b/README.md index 49ec92f..1a7891c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Multi-Agent Chatbot with LaunchDarkly AgentControl +# Multi-Agent Chatbot with LaunchDarkly Agent Management Demo application for the [Agent Graphs tutorial](https://docs.launchdarkly.com/tutorials/agent-graphs). @@ -43,20 +43,20 @@ Open http://localhost:8501 ### LaunchDarkly Integration | File | Purpose | |------|---------| -| `config_manager.py` | **Core LD integration** - fetches AgentControl configs and agent graphs | +| `config_manager.py` | **Core LD integration** - fetches AI configs and agent graphs | | `api/services/agent_service.py` | **Graph orchestration** - traverses Agent Graph, routes between agents | -| `bootstrap/create_configs.py` | Creates AgentControl configs, tools, segments, and targeting rules in LD | +| `bootstrap/create_configs.py` | Creates AI configs, tools, segments, and targeting rules in LD | ### Agents | File | Purpose | |------|---------| -| `agents/generic_agent.py` | Runs any graph node (supervisor, security, support) from its AgentControl config and tools | +| `agents/generic_agent.py` | Runs any graph node (supervisor, security, support) from its AI config and tools | | `agents/ld_agent_helpers.py` | Shared helpers - model creation, tool call limits | ### Tools | File | Purpose | |------|---------| -| `tools_impl/dynamic_tool_factory.py` | Creates tools from AgentControl config definitions | +| `tools_impl/dynamic_tool_factory.py` | Creates tools from AI config definitions | | `tools_impl/search_v1.py` | Basic keyword search | | `tools_impl/search_v2.py` | Semantic vector search | | `tools_impl/reranking.py` | BM25 relevance scoring | @@ -77,7 +77,7 @@ Open http://localhost:8501 ┌─────────────────────────────────────────────────────────────┐ │ LaunchDarkly Dashboard │ │ • Agent Graph (chatbot-flow) │ -│ • AgentControl configs (supervisor, security, support) │ +│ • AI configs (supervisor, security, support) │ │ • Targeting rules (free/paid, EU/other) │ └─────────────────────────────────────────────────────────────┘ │ @@ -115,7 +115,7 @@ Open http://localhost:8501 | Graph edges (routing) | No | | Targeting rules (user segments) | No | | Variation rollout percentages | No | -| New agent type | **Yes** (register in `AGENT_REGISTRY`) | +| New agent node (using existing tools) | No | | New tool integration | **Yes** (implement in `tools_impl/`) | | Routing contract changes | **Yes** (update `_select_next_node()`) | @@ -123,13 +123,9 @@ Open http://localhost:8501 The `AgentGraphExecutor` is stateless and generic: -- **AGENT_REGISTRY**: Maps node key patterns to factory functions +- **Generic node runner (`create_generic_agent`)**: Builds each node at runtime from its LaunchDarkly AI config, instructions, and tools - **Edge-following**: `while current_node` loop until terminal node - **Routing**: Matches `routing_decision` to edge `handoff.route` - **Safety**: Cycle detection, max hop limit (10) -To add a new agent type: -```python -# In agent_service.py -AGENT_REGISTRY["my_agent"] = create_my_agent -``` +To add a new agent node, create its AI config in LaunchDarkly and connect it with an edge in the `chatbot-flow` agent graph—`AgentGraphExecutor` executes it automatically through `create_generic_agent` without code changes unless it needs a new tool in `tools_impl/`. diff --git a/agents/generic_agent.py b/agents/generic_agent.py index 3204121..35d9ac8 100644 --- a/agents/generic_agent.py +++ b/agents/generic_agent.py @@ -75,7 +75,7 @@ async def ainvoke(self, state: dict) -> dict: user_input = state.get("processed_input", state.get("user_input", "")) messages = state.get("messages", [HumanMessage(content=user_input)]) - _rate_limit_llm_call() + await _rate_limit_llm_call() start_time = time.time() # Execute based on whether we have tools diff --git a/agents/ld_agent_helpers.py b/agents/ld_agent_helpers.py index 45b835e..179ab01 100644 --- a/agents/ld_agent_helpers.py +++ b/agents/ld_agent_helpers.py @@ -1,4 +1,5 @@ """LaunchDarkly AI agent helpers - model creation and metric tracking.""" +import asyncio import time import os from typing import Any @@ -30,17 +31,18 @@ def increment(self): # Rate limiting -_last_llm_call_time = 0 +_last_llm_call_time = 0.0 _min_call_interval = 1.0 -def _rate_limit_llm_call(): - """Simple rate limiter for LLM calls.""" +async def _rate_limit_llm_call(): + """Non-blocking rate limiter for LLM calls across concurrent requests.""" global _last_llm_call_time - elapsed = time.time() - _last_llm_call_time - if elapsed < _min_call_interval: - time.sleep(_min_call_interval - elapsed) - _last_llm_call_time = time.time() + now = time.monotonic() + target_time = max(now, _last_llm_call_time + _min_call_interval) if _last_llm_call_time > 0 else now + _last_llm_call_time = target_time + if target_time > now: + await asyncio.sleep(target_time - now) def map_provider_to_langchain(provider_name: str) -> str: diff --git a/api/main.py b/api/main.py index 5a99ad0..86ed29e 100644 --- a/api/main.py +++ b/api/main.py @@ -74,6 +74,19 @@ async def flush_metrics(): return {"success": False, "message": f"Failed to flush metrics: {e}"} +def _resolve_served_variation(feedback: FeedbackRequest, target_agent: str = "support-agent") -> tuple[str | None, int | None]: + """Extract the variationKey and version that actually served the response.""" + configs = feedback.agent_configurations or [] + matched = next((cfg for cfg in configs if cfg.agent_name == target_agent), None) + if matched is None and configs: + matched = configs[-1] + if matched and matched.variation_key and matched.variation_key not in ("unknown", "error", "validation"): + return matched.variation_key, matched.version + if feedback.variation_key and feedback.variation_key not in ("unknown", "agent-graph", "error", "validation"): + return feedback.variation_key, feedback.version + return None, feedback.version + + @app.post("/feedback", response_model=FeedbackResponse) async def submit_feedback(feedback: FeedbackRequest): """Submit user feedback for AI responses""" @@ -85,17 +98,20 @@ async def submit_feedback(feedback: FeedbackRequest): feedback.user_id, feedback.user_context ) + served_variation, served_version = _resolve_served_variation(feedback, "support-agent") success = await agent_service.config_manager.track_feedback( context, "support-agent", - thumbs_up=feedback.feedback == "positive" + thumbs_up=feedback.feedback == "positive", + variation_key=served_variation, + version=served_version, ) if success: - log_debug(f"FEEDBACK SUBMITTED: {feedback.feedback} for {feedback.variation_key}") + log_debug(f"FEEDBACK SUBMITTED: {feedback.feedback} for {served_variation or feedback.variation_key}") return FeedbackResponse( success=True, - message=f"Feedback submitted successfully" + message="Feedback submitted successfully" ) else: log_debug(f"FEEDBACK: Failed to submit feedback to LaunchDarkly") diff --git a/api/models.py b/api/models.py index 67a7495..0a26099 100644 --- a/api/models.py +++ b/api/models.py @@ -12,6 +12,7 @@ class ChatRequest(BaseModel): class AgentConfig(BaseModel): agent_name: str variation_key: str + version: Optional[int] = None model: str tools: List[str] # Available tools configured from LaunchDarkly tools_used: Optional[List[str]] = None # Actual tools that were executed @@ -36,10 +37,12 @@ class FeedbackRequest(BaseModel): ai_response: str feedback: str # "positive" or "negative" variation_key: str + version: Optional[int] = None model: str tool_calls: List[str] source: str # "real_user" or "simulated" user_context: Optional[Dict] = None # Geographic and plan attributes for LaunchDarkly targeting + agent_configurations: Optional[List[AgentConfig]] = None class FeedbackResponse(BaseModel): success: bool diff --git a/api/services/agent_service.py b/api/services/agent_service.py index b09d040..8905e53 100644 --- a/api/services/agent_service.py +++ b/api/services/agent_service.py @@ -100,7 +100,7 @@ async def execute_with_graph( # Track if graph_tracker: - graph_tracker.track_node_invocation(node_key) + graph_tracker.track_node_invocation(current_node) if prev_node_key: graph_tracker.track_handoff_success(prev_node_key, node_key) @@ -217,12 +217,22 @@ def _update_context(self, node_key: str, config, result: dict, ctx: dict, meta: ctx["messages"] = [HumanMessage(content=result["redacted"])] var_key = (meta or {}).get("variationKey") or "unknown" + version = (meta or {}).get("version", 1) + raw_tools = (config or {}).get("tools") + if isinstance(raw_tools, dict): + configured_tools = list(raw_tools.keys()) + elif isinstance(raw_tools, list): + configured_tools = [t["name"] if isinstance(t, dict) and "name" in t else str(t) for t in raw_tools] + else: + configured_tools = [] # Record agent config - fully generic, include all result fields agent_info = { "agent_name": node_key, "variation_key": var_key, + "version": version, "model": ((config or {}).get("model") or {}).get("name", "unknown"), + "tools": configured_tools, "tools_used": result.get("tool_calls", []), } @@ -280,16 +290,23 @@ async def process_message( user_context=user_context or {} ) + agent_configs = result.get("agent_configs", []) + primary_cfg = next( + (cfg for cfg in agent_configs if cfg.get("agent_name") == "support-agent"), + agent_configs[-1] if agent_configs else {}, + ) + return ChatResponse( id=str(uuid.uuid4()), response=result.get("final_response", ""), tool_calls=result.get("tool_calls", []), - variation_key="agent-graph", - model="multi-agent", + variation_key=primary_cfg.get("variation_key", "agent-graph"), + model=primary_cfg.get("model", "multi-agent"), agent_configurations=[ APIAgentConfig( agent_name=cfg["agent_name"], variation_key=cfg.get("variation_key", "default"), + version=cfg.get("version"), model=cfg.get("model", "unknown"), tools=cfg.get("tools", []), tools_used=cfg.get("tools_used", []), @@ -297,7 +314,7 @@ async def process_message( types=cfg.get("types"), redacted=cfg.get("redacted") ) - for cfg in result.get("agent_configs", []) + for cfg in agent_configs ] ) diff --git a/bootstrap/create_configs.py b/bootstrap/create_configs.py index 46b998f..30aa1e0 100644 --- a/bootstrap/create_configs.py +++ b/bootstrap/create_configs.py @@ -302,6 +302,8 @@ def update_variation(self, project_key, config_key, variation_data): "tools": [{"key": tool, "version": 1} for tool in variation_data.get("tools", [])], "modelConfigKey": model_config_key } + if variation_data.get("customParameters"): + payload["model"] = {"custom": variation_data["customParameters"]} print(f" Updating with modelConfigKey: {model_config_key}") response = http.patch(url, headers=self.headers, json=payload, timeout=30) diff --git a/config_manager.py b/config_manager.py index 66f51d8..b3d72ae 100644 --- a/config_manager.py +++ b/config_manager.py @@ -4,13 +4,20 @@ """ import os import uuid +import boto3 import ldclient +from dotenv import load_dotenv from launchdarkly_ai_server import ( get_client, init_client, inspect_config, + make_track_data, resolve_graph, ) +from launchdarkly_ai_server.tracking import make_track_data as make_config_track_data +from utils.logger import log_student, log_debug + +load_dotenv() # The AI SDK has no feedback API, so these are emitted directly. Keep the keys # byte-identical to the ones the previous SDK sent or the existing feedback @@ -30,10 +37,17 @@ class GraphTracker: graph and per-config monitoring views pick them up. """ - def __init__(self, graph_key: str, context: dict): + def __init__(self, graph_key: str, context: dict, meta: dict | None = None): self._graph_key = graph_key + self._run_id = str(uuid.uuid4()) self._context = ldclient.Context.from_dict(context) - self._data = {"runId": str(uuid.uuid4()), "configKey": graph_key, "graphKey": graph_key} + self._data = make_config_track_data( + config_key=graph_key, + config={}, + meta=meta or {}, + graph_key=graph_key, + run_id=self._run_id, + ) self._nodes_entered = 0 def _send(self, event: str, data: dict, value=1): @@ -46,22 +60,17 @@ def _track(self, event: str, value=1, extra: dict | None = None): self._send(event, {**self._data, **(extra or {})}, value) def _node_data(self, node) -> dict: - config = node.config or {} - meta = node.meta or {} - return { - "runId": self._data["runId"], - "graphKey": self._graph_key, - "configKey": node.key, - "variationKey": meta.get("variationKey", ""), - "version": meta.get("version", 1), - "modelName": (config.get("model") or {}).get("name", ""), - "providerName": (config.get("provider") or {}).get("name", ""), - } - - def track_node_invocation(self, node_key: str): + return make_track_data(node, self._graph_key, self._run_id) + + def track_node_invocation(self, node): """Record this node as it is entered; the ordered series is the path.""" - log_debug(f"GRAPH: entering node {node_key}") - self._track("$ld:ai:graph:node", 1, {"nodeKey": node_key, "index": self._nodes_entered}) + log_debug(f"GRAPH: entering node {node.key}") + node_data = self._node_data(node) + self._send( + "$ld:ai:graph:node", + {**node_data, "nodeKey": node.key, "index": self._nodes_entered}, + 1, + ) self._nodes_entered += 1 def track_handoff_success(self, source_key: str, target_key: str): @@ -98,12 +107,6 @@ def track_total_tokens(self, total: int): self._track("$ld:ai:graph:total_tokens", total) -from dotenv import load_dotenv -from utils.logger import log_student, log_debug -import boto3 - -load_dotenv() - class FixedConfigManager: def __init__(self): """Initialize LaunchDarkly client and AI client""" @@ -212,7 +215,11 @@ async def get_agent_graph(self, user_id: str, graph_key: str, user_context: dict ld_user_context = self.build_context(user_id, user_context) graph = await resolve_graph(graph_key, context=ld_user_context) - return graph, GraphTracker(graph_key, ld_user_context) + raw_graph = self.ld_client.variation( + graph_key, ldclient.Context.from_dict(ld_user_context), {} + ) + graph_meta = (raw_graph.get("_ldMeta") or {}) if isinstance(raw_graph, dict) else {} + return graph, GraphTracker(graph_key, ld_user_context, meta=graph_meta) def clear_cache(self): @@ -227,20 +234,41 @@ def flush(self): """Flush metrics and clear SDK cache""" self.ld_client.flush() - async def track_feedback(self, context, config_key: str, thumbs_up: bool): - """Track user feedback with LaunchDarkly. - - The AI SDK has no feedback API, so this emits the event directly on - the same context the config was evaluated with. Monitoring counts it - only when the event names the config and the variation that was served. + async def track_feedback( + self, + context, + config_key: str, + thumbs_up: bool, + variation_key: str | None = None, + version: int | None = None, + ): + """Track user feedback with LaunchDarkly, attributed to the served variation. + + Prefers the variationKey and version returned with the response so feedback + never re-evaluates targeting later; falls back to inspect_config only when + the caller omitted the served variation, and fails if none can be resolved. """ try: await self._ensure_ai_client() - meta = (await inspect_config(config_key, context))["meta"] or {} - data = {"configKey": config_key, "variationKey": meta.get("variationKey", ""), "version": meta.get("version", 1)} + resolved_variation = (variation_key or "").strip() + resolved_version = version + if not resolved_variation: + meta = (await inspect_config(config_key, context))["meta"] or {} + resolved_variation = (meta.get("variationKey") or "").strip() + if resolved_version is None: + resolved_version = meta.get("version", 1) + if not resolved_variation: + log_debug(f"FEEDBACK TRACKING ERROR: no served variationKey for '{config_key}'") + return False + + data = { + "configKey": config_key, + "variationKey": resolved_variation, + "version": resolved_version if resolved_version is not None else 1, + } ld_context = ldclient.Context.from_dict(context) self.ld_client.track(FEEDBACK_EVENTS[bool(thumbs_up)], ld_context, data, 1) - log_student(f"FEEDBACK TRACKED: {'👍 Positive' if thumbs_up else '👎 Negative'}") + log_student(f"FEEDBACK TRACKED: {'👍 Positive' if thumbs_up else '👎 Negative'} ({resolved_variation})") self.ld_client.flush() return True except Exception as e: diff --git a/pyproject.toml b/pyproject.toml index f8f40af..37b6fec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,3 +50,8 @@ dev = [ [tool.setuptools] packages = ["api", "agents"] +[tool.pytest.ini_options] +testpaths = ["tests"] +asyncio_mode = "auto" + + diff --git a/tests/test_review_fixes.py b/tests/test_review_fixes.py new file mode 100644 index 0000000..17b7488 --- /dev/null +++ b/tests/test_review_fixes.py @@ -0,0 +1,256 @@ +"""Unit tests covering all 6 review items on devrel-agents-tutorial#30.""" +import asyncio +import os +import sys +import time +from pathlib import Path +from types import SimpleNamespace + +os.environ.setdefault("LD_SDK_KEY", "sdk-test-key") +os.environ.setdefault("LD_API_KEY", "api-test-key") +os.environ.setdefault("AUTH_METHOD", "api-key") + +REPO_ROOT = Path(__file__).resolve().parent.parent +sys.path.insert(0, str(REPO_ROOT)) + + +def test_dynamic_tool_factory_reads_top_level_tools_dict_schema_and_description(): + from tools_impl.dynamic_tool_factory import ( + create_dynamic_tools_from_launchdarkly, + extract_tool_configs_from_launchdarkly, + ) + + served_config = { + "instructions": "Answer using tools.", + "model": {"name": "claude-sonnet-5-5"}, + "provider": {"name": "Anthropic"}, + "tools": { + "search_v2": { + "name": "search_v2", + "type": "function", + "description": "Custom LD semantic search description", + "parameters": { + "type": "object", + "properties": { + "query": {"type": "string", "description": "LD query field"}, + "top_k": {"type": "integer", "description": "LD top_k field"}, + "category": {"type": "string", "description": "Optional category filter"}, + }, + "required": ["query"], + }, + }, + "reranking": { + "name": "reranking", + "type": "function", + "description": "Custom LD reranking description", + "parameters": { + "type": "object", + "properties": { + "query": {"type": "string", "description": "Query to rank against"}, + "results": {"type": "array", "description": "Candidate results"}, + }, + "required": ["query"], + }, + }, + }, + } + + tools_list, tool_configs = extract_tool_configs_from_launchdarkly(served_config) + assert tools_list == ["search_v2", "reranking"] + assert "properties" in tool_configs["search_v2"] + assert "category" in tool_configs["search_v2"]["properties"] + + tools = create_dynamic_tools_from_launchdarkly(served_config) + search_tool = next(t for t in tools if t.name == "search_v2") + rerank_tool = next(t for t in tools if t.name == "reranking") + + assert search_tool.description == "Custom LD semantic search description" + assert "category" in search_tool.args_schema.model_fields + assert search_tool.args_schema.model_fields["query"].description == "LD query field" + assert rerank_tool.description == "Custom LD reranking description" + + +def test_graph_tracker_uses_make_track_data_for_node_and_graph_variation(monkeypatch): + import config_manager + from config_manager import GraphTracker + + tracked = [] + + class FakeClient: + def track(self, event, context, data, value=1): + tracked.append((event, data, value)) + + monkeypatch.setattr(config_manager, "get_client", lambda: FakeClient()) + + tracker = GraphTracker( + "chatbot-flow", + {"kind": "user", "key": "u1", "plan": "paid"}, + meta={"variationKey": "default-flow", "version": 3}, + ) + supervisor_node = SimpleNamespace( + key="supervisor-agent", + config={"model": {"name": "gpt-6-luna"}, "provider": {"name": "OpenAI"}}, + meta={"variationKey": "supervisor-v2", "version": 4, "modelKey": "OpenAI.gpt-6-luna", "modelVersion": 1}, + ) + support_node = SimpleNamespace( + key="support-agent", + config={"model": {"name": "claude-sonnet-5-5"}, "provider": {"name": "Anthropic"}}, + meta={"variationKey": "eu-paid", "version": 7}, + ) + + tracker.track_node_invocation(supervisor_node) + tracker.track_handoff_success("supervisor-agent", "support-agent") + tracker.track_node_invocation(support_node) + tracker.track_invocation_success() + + node_events = [data for evt, data, _ in tracked if evt == "$ld:ai:graph:node"] + assert len(node_events) == 2 + assert node_events[0]["configKey"] == "supervisor-agent" + assert node_events[0]["variationKey"] == "supervisor-v2" + assert node_events[0]["version"] == 4 + assert node_events[0]["modelName"] == "gpt-6-luna" + assert node_events[0]["providerName"] == "OpenAI" + assert node_events[0]["modelKey"] == "OpenAI.gpt-6-luna" + assert node_events[0]["graphKey"] == "chatbot-flow" + assert node_events[0]["nodeKey"] == "supervisor-agent" + assert node_events[0]["index"] == 0 + + assert node_events[1]["configKey"] == "support-agent" + assert node_events[1]["variationKey"] == "eu-paid" + assert node_events[1]["version"] == 7 + assert node_events[1]["nodeKey"] == "support-agent" + assert node_events[1]["index"] == 1 + + graph_success = next(data for evt, data, _ in tracked if evt == "$ld:ai:graph:invocation_success") + assert graph_success["configKey"] == "chatbot-flow" + assert graph_success["variationKey"] == "default-flow" + assert graph_success["version"] == 3 + + +async def test_feedback_uses_served_variation_without_reevaluating_and_rejects_empty(monkeypatch): + import config_manager + from api.models import AgentConfig, FeedbackRequest + from config_manager import FEEDBACK_EVENTS, FixedConfigManager + + # Build a manager without opening a real LaunchDarkly stream + manager = object.__new__(FixedConfigManager) + tracked = [] + + class FakeLDClient: + def track(self, event, context, data, value=1): + tracked.append((event, context, data, value)) + + def flush(self): + pass + + manager.ld_client = FakeLDClient() + + async def noop_ensure(): + return None + + inspect_calls = [] + + async def fake_inspect(config_key, context): + inspect_calls.append((config_key, context)) + return {"enabled": False, "config": None, "meta": None} + + monkeypatch.setattr(FixedConfigManager, "_initialize_launchdarkly_client", lambda self: setattr(self, "ld_client", FakeLDClient())) + monkeypatch.setattr(manager, "_ensure_ai_client", noop_ensure) + monkeypatch.setattr(config_manager, "inspect_config", fake_inspect) + + # 1. Served variation from agent_configurations attributes directly without calling inspect_config + from api.main import _resolve_served_variation + + req = FeedbackRequest( + user_id="eu-paid-user", + message_id="msg_1", + user_query="How do regions work?", + ai_response="Here are the regions.", + feedback="positive", + variation_key="agent-graph", + model="multi-agent", + tool_calls=["search_v2"], + source="real_user", + user_context={"country": "DE", "plan": "paid"}, + agent_configurations=[ + AgentConfig(agent_name="supervisor-agent", variation_key="sup-default", version=1, model="gpt-6-luna", tools=[]), + AgentConfig(agent_name="support-agent", variation_key="eu-paid", version=5, model="claude-sonnet-5-5", tools=["search_v2"]), + ], + ) + served_var, served_ver = _resolve_served_variation(req, "support-agent") + assert (served_var, served_ver) == ("eu-paid", 5) + + ctx = manager.build_context(req.user_id, req.user_context) + ok = await manager.track_feedback(ctx, "support-agent", thumbs_up=True, variation_key=served_var, version=served_ver) + assert ok is True + assert inspect_calls == [] + event, _, data, value = tracked[0] + assert event == FEEDBACK_EVENTS[True] + assert data == {"configKey": "support-agent", "variationKey": "eu-paid", "version": 5} + assert value == 1 + + # 2. Missing variation + failed inspect_config returns False instead of emitting empty variationKey + ok_missing = await manager.track_feedback(ctx, "support-agent", thumbs_up=False, variation_key=None) + assert ok_missing is False + assert len(tracked) == 1 + + +async def test_rate_limiter_uses_asyncio_sleep_without_blocking_event_loop(monkeypatch): + import agents.ld_agent_helpers as helpers + + slept = [] + + async def fake_async_sleep(delay): + slept.append(delay) + + def forbidden_blocking_sleep(_delay): + raise AssertionError("time.sleep must not be called on the async event loop") + + monkeypatch.setattr(helpers.asyncio, "sleep", fake_async_sleep) + monkeypatch.setattr(helpers.time, "sleep", forbidden_blocking_sleep) + helpers._last_llm_call_time = time.monotonic() + + await asyncio.gather(helpers._rate_limit_llm_call(), helpers._rate_limit_llm_call()) + assert len(slept) == 2 + assert slept[1] > slept[0] + + +def test_update_variation_preserves_model_custom_parameters(monkeypatch): + import bootstrap.create_configs as create_configs + + patched = [] + + class FakeResp: + status_code = 200 + text = "" + + def json(self): + return {"_id": "var-123"} + + monkeypatch.setattr(create_configs.http, "patch", lambda url, headers, json, timeout: patched.append(json) or FakeResp()) + monkeypatch.setattr(create_configs.time, "sleep", lambda _s: None) + + boot = create_configs.MultiAgentBootstrap("api-test-key") + boot.overwrite = True + monkeypatch.setattr(boot, "list_variations", lambda _proj, _cfg: [{"key": "eu-paid", "_id": "var-123"}]) + + boot.update_variation( + "multi-agent-chatbot", + "support-agent", + { + "key": "eu-paid", + "instructions": "Use search_v2.", + "tools": ["search_v2"], + "modelConfig": {"modelId": "Anthropic.claude-sonnet-5-5"}, + "customParameters": {"max_tool_calls": 6}, + }, + ) + + assert patched[0]["model"] == {"custom": {"max_tool_calls": 6}} + assert patched[0]["modelConfigKey"] == "Anthropic.claude-sonnet-5-5" + + +def test_readme_does_not_reference_deleted_agent_registry(): + readme = (REPO_ROOT / "README.md").read_text() + assert "AGENT_REGISTRY" not in readme + assert "create_generic_agent" in readme diff --git a/tools/traffic_generator.py b/tools/traffic_generator.py index 111dd74..f8d7627 100755 --- a/tools/traffic_generator.py +++ b/tools/traffic_generator.py @@ -156,7 +156,8 @@ def send_chat(self, query): "response": data.get("response", ""), "variation_key": data.get("variation_key"), "model": data.get("model"), - "tool_calls": data.get("tool_calls", []) # Add tool_calls from response + "tool_calls": data.get("tool_calls", []), # Add tool_calls from response + "agent_configurations": data.get("agent_configurations") or [], } else: return {"success": False} @@ -216,7 +217,8 @@ def send_feedback(self, chat_data, query, feedback_type): "model": chat_data.get("model", "unknown"), "tool_calls": chat_data.get("tool_calls", []), # Add required tool_calls field "source": "simulated", - "user_context": self.user_context # Add context for LaunchDarkly targeting + "user_context": self.user_context, # Add context for LaunchDarkly targeting + "agent_configurations": chat_data.get("agent_configurations") or [], }, timeout=10 ) diff --git a/tools_impl/dynamic_tool_factory.py b/tools_impl/dynamic_tool_factory.py index ae7404a..593a9e6 100644 --- a/tools_impl/dynamic_tool_factory.py +++ b/tools_impl/dynamic_tool_factory.py @@ -25,29 +25,36 @@ def extract_tool_configs_from_launchdarkly(config) -> tuple[List[str], Dict[str, # returned no tools at all rather than erroring. config = config or {} - # A top-level `tools` key is what the local defaults file writes. - for tool_name in config.get('tools') or []: - if tool_name not in tools_list: - tools_list.append(tool_name) - - # LaunchDarkly serves tools under model.parameters.tools, with the schema. - try: - tools_data = ((config.get('model') or {}).get('parameters') or {}).get('tools') or [] - for tool in tools_data: - if 'name' in tool: - tool_name = tool['name'] + # LaunchDarkly 1.1.0 serves top-level `tools` as a dict keyed by tool name, + # where each entry carries `name`, `description`, and `parameters`. Local + # fixtures may also pass `tools` as a list of names or tool dicts. + raw_tools = config.get('tools') + if isinstance(raw_tools, dict): + for key, spec in raw_tools.items(): + spec_dict = spec if isinstance(spec, dict) else {} + tool_name = spec_dict.get('name') or key + if tool_name not in tools_list: + tools_list.append(tool_name) + params = dict(spec_dict.get('parameters') or {}) + if spec_dict.get('description'): + params['description'] = spec_dict['description'] + tool_configs[tool_name] = params + elif isinstance(raw_tools, list): + for item in raw_tools: + if isinstance(item, dict) and item.get('name'): + tool_name = item['name'] if tool_name not in tools_list: tools_list.append(tool_name) - # Extract tool parameters/schema from LaunchDarkly - tool_configs[tool_name] = tool.get('parameters', {}) + params = dict(item.get('parameters') or {}) + if item.get('description'): + params['description'] = item['description'] + tool_configs[tool_name] = params + elif isinstance(item, str) and item not in tools_list: + tools_list.append(item) - log_debug(f"EXTRACTED TOOLS FROM LAUNCHDARKLY: {tools_list}") - if tool_configs: - log_verbose(f" TOOL CONFIGS FROM LAUNCHDARKLY: {tool_configs}") - - except Exception as e: - log_debug(f"Error extracting tool configs from LaunchDarkly: {e}") - pass # Fallback to just the tools list and defaults + log_debug(f"EXTRACTED TOOLS FROM LAUNCHDARKLY: {tools_list}") + if tool_configs: + log_verbose(f" TOOL CONFIGS FROM LAUNCHDARKLY: {tool_configs}") return tools_list, tool_configs @@ -78,12 +85,20 @@ def _create_dynamic_search_v1(tool_config: Dict[str, Any]) -> BaseTool: # Create base tool instance tool = SearchToolV1() - # Apply LaunchDarkly configuration if available - if tool_config and 'properties' in tool_config: - log_debug(f"SEARCH_V1: Applying LaunchDarkly config") - # Could override defaults here based on LaunchDarkly config - # For now, just log that config is available - pass + if tool_config: + if tool_config.get('description'): + object.__setattr__(tool, 'description', tool_config['description']) + if 'properties' in tool_config: + log_debug("SEARCH_V1: Applying LaunchDarkly config") + field_definitions = {} + required = set(tool_config.get('required') or []) + for field_name, field_config in tool_config['properties'].items(): + field_desc = field_config.get('description', '') + if field_name in required: + field_definitions[field_name] = (str, Field(description=field_desc)) + else: + field_definitions[field_name] = (Optional[str], Field(default=None, description=field_desc)) + object.__setattr__(tool, 'args_schema', create_model('DynamicSearchV1Input', **field_definitions)) return tool @@ -105,7 +120,7 @@ def _create_dynamic_search_v2(tool_config: Dict[str, Any]) -> BaseTool: field_description = field_config.get('description', '') # Map LaunchDarkly JSON schema types to Python types - if field_config.get('type') == 'number': + if field_config.get('type') in ('number', 'integer'): field_type = int field_default = 3 # Default for top_k elif field_config.get('type') == 'string': @@ -127,10 +142,15 @@ class DynamicSearchV2Input(BaseModel): query: str top_k: Optional[int] = 3 + configured_description = ( + (tool_config or {}).get('description') + or "Semantic search through the knowledge base. Use for technical questions and concepts." + ) + # Create dynamic tool class class DynamicSearchToolV2(BaseTool): name: str = "search_v2" - description: str = "Semantic search through the knowledge base. Use for technical questions and concepts." + description: str = configured_description args_schema: type[BaseModel] = DynamicSearchV2Input def _run(self, query: str, top_k: int = 3) -> str: @@ -152,6 +172,7 @@ def _create_dynamic_reranking_tool(tool_config: Dict[str, Any]) -> BaseTool: # Build Pydantic field definitions from LaunchDarkly schema field_definitions = {} + required = set(tool_config.get('required') or []) for field_name, field_config in properties.items(): field_description = field_config.get('description', '') @@ -165,7 +186,10 @@ def _create_dynamic_reranking_tool(tool_config: Dict[str, Any]) -> BaseTool: field_type = str # Default # Create Pydantic field - field_definitions[field_name] = (field_type, Field(description=field_description)) + if field_name in required: + field_definitions[field_name] = (field_type, Field(description=field_description)) + else: + field_definitions[field_name] = (Optional[field_type], Field(default=None, description=field_description)) # Create dynamic Pydantic model DynamicRerankingInput = create_model('DynamicRerankingInput', **field_definitions) @@ -177,10 +201,15 @@ class DynamicRerankingInput(BaseModel): query: str results: Optional[List[Dict[str, Any]]] = None + configured_description = ( + (tool_config or {}).get('description') + or "Rerank search results by relevance. Use after search to improve result ordering." + ) + # Create dynamic tool class class DynamicRerankingTool(BaseTool): name: str = "reranking" - description: str = "Rerank search results by relevance. Use after search to improve result ordering." + description: str = configured_description args_schema: type[BaseModel] = DynamicRerankingInput def _run(self, query: str, results: List[Dict[str, Any]] = None, **kwargs) -> str: diff --git a/ui/chat_interface.py b/ui/chat_interface.py index 66f3815..5e9d0dc 100644 --- a/ui/chat_interface.py +++ b/ui/chat_interface.py @@ -359,6 +359,9 @@ def process_tool_display(tools, tool_details): if "message_id" in message: message_id = message["message_id"] current_feedback = message.get("feedback") + msg_meta = message.get("metadata") or {} + msg_agent_configs = msg_meta.get("agent_configurations") or [] + msg_context = message.get("user_context") or get_user_context(st.session_state.user_id, sample_users) col1, col2, col3 = st.columns([1, 1, 8]) with col1: @@ -375,13 +378,15 @@ def process_tool_display(tools, tool_details): "user_query": message.get("user_query", ""), "ai_response": message["content"], "feedback": "positive", - "variation_key": message["metadata"].get("primary_variation", "unknown"), - "model": message["metadata"].get("primary_model", "unknown"), - "tool_calls": message["metadata"].get("tools_used", []), - "source": "real_user" + "variation_key": msg_meta.get("primary_variation", "unknown"), + "model": msg_meta.get("primary_model", "unknown"), + "tool_calls": msg_meta.get("tools_used", []), + "source": "real_user", + "user_context": msg_context, + "agent_configurations": msg_agent_configs, } ) - if feedback_response.status_code == 200: + if feedback_response.status_code == 200 and feedback_response.json().get("success", True): message["feedback"] = "positive" st.rerun() else: @@ -403,13 +408,15 @@ def process_tool_display(tools, tool_details): "user_query": message.get("user_query", ""), "ai_response": message["content"], "feedback": "negative", - "variation_key": message["metadata"].get("primary_variation", "unknown"), - "model": message["metadata"].get("primary_model", "unknown"), - "tool_calls": message["metadata"].get("tools_used", []), - "source": "real_user" + "variation_key": msg_meta.get("primary_variation", "unknown"), + "model": msg_meta.get("primary_model", "unknown"), + "tool_calls": msg_meta.get("tools_used", []), + "source": "real_user", + "user_context": msg_context, + "agent_configurations": msg_agent_configs, } ) - if feedback_response.status_code == 200: + if feedback_response.status_code == 200 and feedback_response.json().get("success", True): message["feedback"] = "negative" st.rerun() else: @@ -572,6 +579,7 @@ def process_tool_display(tools, tool_details): "metadata": metadata, "message_id": message_id, "user_query": prompt, + "user_context": user_context, "feedback": None }) @@ -613,10 +621,12 @@ def process_tool_display(tools, tool_details): "variation_key": data["variation_key"], "model": data["model"], "tool_calls": data["tool_calls"], - "source": "real_user" + "source": "real_user", + "user_context": user_context, + "agent_configurations": data.get("agent_configurations") or [], } ) - if feedback_response.status_code == 200: + if feedback_response.status_code == 200 and feedback_response.json().get("success", True): # Update message in session state immediately for msg in st.session_state.messages: if msg.get("message_id") == message_id: @@ -644,10 +654,12 @@ def process_tool_display(tools, tool_details): "variation_key": data["variation_key"], "model": data["model"], "tool_calls": data["tool_calls"], - "source": "real_user" + "source": "real_user", + "user_context": user_context, + "agent_configurations": data.get("agent_configurations") or [], } ) - if feedback_response.status_code == 200: + if feedback_response.status_code == 200 and feedback_response.json().get("success", True): # Update message in session state immediately for msg in st.session_state.messages: if msg.get("message_id") == message_id: From 6da898457a293c9203bd5e65c183b9541a8a181b Mon Sep 17 00:00:00 2001 From: Scarlett Attensil Date: Mon, 23 Nov 2026 09:39:07 -0800 Subject: [PATCH 11/12] fix(review): support dynamic tool kwargs/types/nulls, root make_track_data, and matched feedback configKey Co-authored-by: Cursor --- api/main.py | 19 +++-- config_manager.py | 12 ++- tests/test_review_fixes.py | 106 ++++++++++++++++++++++--- tools_impl/dynamic_tool_factory.py | 120 ++++++++++++++--------------- tools_impl/search_v1.py | 14 ++-- tools_impl/search_v2.py | 7 +- 6 files changed, 182 insertions(+), 96 deletions(-) diff --git a/api/main.py b/api/main.py index 86ed29e..fa5baba 100644 --- a/api/main.py +++ b/api/main.py @@ -74,17 +74,20 @@ async def flush_metrics(): return {"success": False, "message": f"Failed to flush metrics: {e}"} -def _resolve_served_variation(feedback: FeedbackRequest, target_agent: str = "support-agent") -> tuple[str | None, int | None]: - """Extract the variationKey and version that actually served the response.""" +def _resolve_served_variation( + feedback: FeedbackRequest, target_agent: str = "support-agent" +) -> tuple[str, str | None, int | None]: + """Extract the configKey, variationKey, and version that actually served the response.""" configs = feedback.agent_configurations or [] matched = next((cfg for cfg in configs if cfg.agent_name == target_agent), None) if matched is None and configs: matched = configs[-1] + resolved_agent = (matched.agent_name if matched and matched.agent_name else None) or target_agent if matched and matched.variation_key and matched.variation_key not in ("unknown", "error", "validation"): - return matched.variation_key, matched.version + return resolved_agent, matched.variation_key, matched.version if feedback.variation_key and feedback.variation_key not in ("unknown", "agent-graph", "error", "validation"): - return feedback.variation_key, feedback.version - return None, feedback.version + return target_agent, feedback.variation_key, feedback.version + return resolved_agent, None, feedback.version @app.post("/feedback", response_model=FeedbackResponse) @@ -98,10 +101,12 @@ async def submit_feedback(feedback: FeedbackRequest): feedback.user_id, feedback.user_context ) - served_variation, served_version = _resolve_served_variation(feedback, "support-agent") + served_config_key, served_variation, served_version = _resolve_served_variation( + feedback, "support-agent" + ) success = await agent_service.config_manager.track_feedback( context, - "support-agent", + served_config_key, thumbs_up=feedback.feedback == "positive", variation_key=served_variation, version=served_version, diff --git a/config_manager.py b/config_manager.py index b3d72ae..81a5e26 100644 --- a/config_manager.py +++ b/config_manager.py @@ -8,13 +8,13 @@ import ldclient from dotenv import load_dotenv from launchdarkly_ai_server import ( + GraphNode, get_client, init_client, inspect_config, make_track_data, resolve_graph, ) -from launchdarkly_ai_server.tracking import make_track_data as make_config_track_data from utils.logger import log_student, log_debug load_dotenv() @@ -41,12 +41,10 @@ def __init__(self, graph_key: str, context: dict, meta: dict | None = None): self._graph_key = graph_key self._run_id = str(uuid.uuid4()) self._context = ldclient.Context.from_dict(context) - self._data = make_config_track_data( - config_key=graph_key, - config={}, - meta=meta or {}, - graph_key=graph_key, - run_id=self._run_id, + self._data = make_track_data( + GraphNode(key=graph_key, config={}, meta=meta or {}), + graph_key, + self._run_id, ) self._nodes_entered = 0 diff --git a/tests/test_review_fixes.py b/tests/test_review_fixes.py index 17b7488..ceff8d2 100644 --- a/tests/test_review_fixes.py +++ b/tests/test_review_fixes.py @@ -14,17 +14,51 @@ sys.path.insert(0, str(REPO_ROOT)) -def test_dynamic_tool_factory_reads_top_level_tools_dict_schema_and_description(): +async def test_dynamic_tool_factory_reads_top_level_tools_dict_schema_and_invokes_all_tools(monkeypatch): + import tools_impl.search_v1 as search_v1_mod + import tools_impl.search_v2 as search_v2_mod + from agents.ld_agent_helpers import ToolCallCounter, wrap_tool_with_counter from tools_impl.dynamic_tool_factory import ( create_dynamic_tools_from_launchdarkly, extract_tool_configs_from_launchdarkly, ) + class FakeVectorStore: + documents = [ + "Umbra offers a 30-day refund policy on Pro and Team plans.", + "Serverless functions support 15-minute maximum timeout limits.", + "Deployments run across US, EU, and APAC edge regions.", + ] + + def exists(self): + return True + + def search(self, query: str, top_k: int = 3): + return [(doc, 0.85, {"idx": idx}) for idx, doc in enumerate(self.documents[:top_k])] + + monkeypatch.setattr(search_v1_mod, "VectorStore", FakeVectorStore) + monkeypatch.setattr(search_v2_mod, "_get_vector_store", lambda: FakeVectorStore()) + search_v2_mod._cached_search.cache_clear() + + # Exact bootstrap schemas for search_v1 (top_k: number optional) + extra custom field on search_v2 served_config = { "instructions": "Answer using tools.", "model": {"name": "claude-sonnet-5-5"}, "provider": {"name": "Anthropic"}, "tools": { + "search_v1": { + "name": "search_v1", + "type": "function", + "description": "Custom LD keyword search description", + "parameters": { + "type": "object", + "properties": { + "query": {"type": "string", "description": "Search query for keyword matching"}, + "top_k": {"type": "number", "description": "Number of results to return"}, + }, + "required": ["query"], + }, + }, "search_v2": { "name": "search_v2", "type": "function", @@ -33,7 +67,7 @@ def test_dynamic_tool_factory_reads_top_level_tools_dict_schema_and_description( "type": "object", "properties": { "query": {"type": "string", "description": "LD query field"}, - "top_k": {"type": "integer", "description": "LD top_k field"}, + "top_k": {"type": "number", "description": "LD top_k field"}, "category": {"type": "string", "description": "Optional category filter"}, }, "required": ["query"], @@ -56,19 +90,48 @@ def test_dynamic_tool_factory_reads_top_level_tools_dict_schema_and_description( } tools_list, tool_configs = extract_tool_configs_from_launchdarkly(served_config) - assert tools_list == ["search_v2", "reranking"] + assert tools_list == ["search_v1", "search_v2", "reranking"] assert "properties" in tool_configs["search_v2"] assert "category" in tool_configs["search_v2"]["properties"] tools = create_dynamic_tools_from_launchdarkly(served_config) - search_tool = next(t for t in tools if t.name == "search_v2") + v1_tool = next(t for t in tools if t.name == "search_v1") + v2_tool = next(t for t in tools if t.name == "search_v2") rerank_tool = next(t for t in tools if t.name == "reranking") - assert search_tool.description == "Custom LD semantic search description" - assert "category" in search_tool.args_schema.model_fields - assert search_tool.args_schema.model_fields["query"].description == "LD query field" + assert v1_tool.description == "Custom LD keyword search description" + assert v2_tool.description == "Custom LD semantic search description" + assert "category" in v2_tool.args_schema.model_fields + assert v2_tool.args_schema.model_fields["query"].description == "LD query field" assert rerank_tool.description == "Custom LD reranking description" + # Exercise both direct BaseTool.invoke/ainvoke and GenericAgent's wrap_tool_with_counter wrapper + counter = ToolCallCounter(max_calls=20) + wrapped = {t.name: wrap_tool_with_counter(t, counter) for t in tools} + + # search_v1: without top_k, with numeric top_k, and with explicit null top_k + assert "30-day refund" in v1_tool.invoke({"query": "refund"}) + assert "30-day refund" in wrapped["search_v1"].invoke({"query": "refund"}) + assert "30-day refund" in await wrapped["search_v1"].ainvoke({"query": "refund", "top_k": 2}) + assert "30-day refund" in await wrapped["search_v1"].ainvoke({"query": "refund", "top_k": None}) + + # search_v2: without top_k/category, with extra schema field, and with explicit nulls + assert "Found 3 relevant document(s)" in v2_tool.invoke({"query": "refund"}) + assert "Found 2 relevant document(s)" in wrapped["search_v2"].invoke( + {"query": "refund", "top_k": 2, "category": "billing"} + ) + assert "Found 3 relevant document(s)" in await wrapped["search_v2"].ainvoke( + {"query": "refund", "top_k": None, "category": None} + ) + + # reranking: with results list and with explicit null results + sample_results = [{"text": "Refunds within 30 days", "score": 0.8}, {"text": "Edge regions", "score": 0.7}] + assert "BM25 reranked results" in rerank_tool.invoke({"query": "refund", "results": sample_results}) + assert "BM25 reranked results" in await wrapped["reranking"].ainvoke( + {"query": "refund", "results": sample_results} + ) + assert "No search results found" in wrapped["reranking"].invoke({"query": "refund", "results": None}) + def test_graph_tracker_uses_make_track_data_for_node_and_graph_variation(monkeypatch): import config_manager @@ -177,11 +240,11 @@ async def fake_inspect(config_key, context): AgentConfig(agent_name="support-agent", variation_key="eu-paid", version=5, model="claude-sonnet-5-5", tools=["search_v2"]), ], ) - served_var, served_ver = _resolve_served_variation(req, "support-agent") - assert (served_var, served_ver) == ("eu-paid", 5) + served_cfg, served_var, served_ver = _resolve_served_variation(req, "support-agent") + assert (served_cfg, served_var, served_ver) == ("support-agent", "eu-paid", 5) ctx = manager.build_context(req.user_id, req.user_context) - ok = await manager.track_feedback(ctx, "support-agent", thumbs_up=True, variation_key=served_var, version=served_ver) + ok = await manager.track_feedback(ctx, served_cfg, thumbs_up=True, variation_key=served_var, version=served_ver) assert ok is True assert inspect_calls == [] event, _, data, value = tracked[0] @@ -189,10 +252,29 @@ async def fake_inspect(config_key, context): assert data == {"configKey": "support-agent", "variationKey": "eu-paid", "version": 5} assert value == 1 - # 2. Missing variation + failed inspect_config returns False instead of emitting empty variationKey + # 2. Custom terminal node (no support-agent in agent_configurations) keeps configKey and variationKey aligned + custom_terminal_req = req.model_copy( + update={ + "agent_configurations": [ + AgentConfig(agent_name="supervisor-agent", variation_key="sup-default", version=1, model="gpt-6-luna", tools=[]), + AgentConfig(agent_name="billing-specialist", variation_key="billing-v2", version=3, model="claude-sonnet-5-5", tools=[]), + ] + } + ) + term_cfg, term_var, term_ver = _resolve_served_variation(custom_terminal_req, "support-agent") + assert (term_cfg, term_var, term_ver) == ("billing-specialist", "billing-v2", 3) + ok_term = await manager.track_feedback(ctx, term_cfg, thumbs_up=True, variation_key=term_var, version=term_ver) + assert ok_term is True + assert tracked[1][2] == {"configKey": "billing-specialist", "variationKey": "billing-v2", "version": 3} + + # 3. Missing variation + failed inspect_config returns False instead of emitting empty variationKey ok_missing = await manager.track_feedback(ctx, "support-agent", thumbs_up=False, variation_key=None) assert ok_missing is False - assert len(tracked) == 1 + assert len(tracked) == 2 + + # 4. config_manager uses only public root launchdarkly_ai_server exports + cfg_src = (REPO_ROOT / "config_manager.py").read_text() + assert "launchdarkly_ai_server.tracking" not in cfg_src async def test_rate_limiter_uses_asyncio_sleep_without_blocking_event_loop(monkeypatch): diff --git a/tools_impl/dynamic_tool_factory.py b/tools_impl/dynamic_tool_factory.py index 593a9e6..bd2295f 100644 --- a/tools_impl/dynamic_tool_factory.py +++ b/tools_impl/dynamic_tool_factory.py @@ -78,6 +78,51 @@ def create_dynamic_tool_instance(tool_name: str, tool_config: Dict[str, Any]) -> return None +def _json_schema_field_type(field_name: str, field_config: Dict[str, Any]) -> Any: + """Map a JSON-schema property definition to its corresponding Python type.""" + schema_type = (field_config or {}).get("type") + if schema_type == "integer": + return int + if schema_type == "number": + return int if field_name == "top_k" else float + if schema_type == "boolean": + return bool + if schema_type == "array": + items = (field_config or {}).get("items") + if field_name == "results" or (isinstance(items, dict) and items.get("type") == "object"): + return List[Dict[str, Any]] + return List[Any] + if schema_type == "object": + return Dict[str, Any] + return str + + +def _build_args_schema( + model_name: str, + tool_config: Dict[str, Any], + defaults: Optional[Dict[str, Any]] = None, +) -> type[BaseModel]: + """Build a Pydantic args_schema from a LaunchDarkly JSON-schema object.""" + field_definitions: Dict[str, Any] = {} + required = set(tool_config.get("required") or []) + defaults = defaults or {} + + for field_name, raw_field_cfg in (tool_config.get("properties") or {}).items(): + field_cfg = raw_field_cfg if isinstance(raw_field_cfg, dict) else {} + field_desc = field_cfg.get("description", "") + field_type = _json_schema_field_type(field_name, field_cfg) + if field_name in required: + field_definitions[field_name] = (field_type, Field(description=field_desc)) + else: + default_val = field_cfg.get("default", defaults.get(field_name, None)) + field_definitions[field_name] = ( + Optional[field_type], + Field(default=default_val, description=field_desc), + ) + + return create_model(model_name, **field_definitions) + + def _create_dynamic_search_v1(tool_config: Dict[str, Any]) -> BaseTool: """Create search_v1 tool with LaunchDarkly configuration""" from tools_impl.search_v1 import SearchToolV1 @@ -90,15 +135,11 @@ def _create_dynamic_search_v1(tool_config: Dict[str, Any]) -> BaseTool: object.__setattr__(tool, 'description', tool_config['description']) if 'properties' in tool_config: log_debug("SEARCH_V1: Applying LaunchDarkly config") - field_definitions = {} - required = set(tool_config.get('required') or []) - for field_name, field_config in tool_config['properties'].items(): - field_desc = field_config.get('description', '') - if field_name in required: - field_definitions[field_name] = (str, Field(description=field_desc)) - else: - field_definitions[field_name] = (Optional[str], Field(default=None, description=field_desc)) - object.__setattr__(tool, 'args_schema', create_model('DynamicSearchV1Input', **field_definitions)) + object.__setattr__( + tool, + 'args_schema', + _build_args_schema('DynamicSearchV1Input', tool_config, defaults={'top_k': 5}), + ) return tool @@ -110,31 +151,11 @@ def _create_dynamic_search_v2(tool_config: Dict[str, Any]) -> BaseTool: if tool_config and 'properties' in tool_config: properties = tool_config['properties'] log_debug(f"SEARCH_V2: Creating dynamic schema from LaunchDarkly: {properties}") - - # Build Pydantic field definitions from LaunchDarkly schema - field_definitions = {} - - for field_name, field_config in properties.items(): - field_type = str # Default to string - field_default = None - field_description = field_config.get('description', '') - - # Map LaunchDarkly JSON schema types to Python types - if field_config.get('type') in ('number', 'integer'): - field_type = int - field_default = 3 # Default for top_k - elif field_config.get('type') == 'string': - field_type = str - - # Create Pydantic field - if field_name in tool_config.get('required', []): - field_definitions[field_name] = (field_type, Field(description=field_description)) - else: - field_definitions[field_name] = (field_type, Field(default=field_default, description=field_description)) - - # Create dynamic Pydantic model - DynamicSearchV2Input = create_model('DynamicSearchV2Input', **field_definitions) - + DynamicSearchV2Input = _build_args_schema( + 'DynamicSearchV2Input', + tool_config, + defaults={'top_k': 3}, + ) else: # Fallback to minimal schema log_debug(f"SEARCH_V2: No LaunchDarkly config found, using minimal schema") @@ -153,11 +174,12 @@ class DynamicSearchToolV2(BaseTool): description: str = configured_description args_schema: type[BaseModel] = DynamicSearchV2Input - def _run(self, query: str, top_k: int = 3) -> str: + def _run(self, query: str, top_k: Optional[int] = 3, **kwargs: Any) -> str: # Import and delegate to actual implementation from tools_impl.search_v2 import SearchToolV2 actual_tool = SearchToolV2() - return actual_tool._run(query, top_k) + resolved_top_k = 3 if top_k is None else int(top_k) + return actual_tool._run(query, resolved_top_k, **kwargs) return DynamicSearchToolV2() @@ -169,31 +191,7 @@ def _create_dynamic_reranking_tool(tool_config: Dict[str, Any]) -> BaseTool: if tool_config and 'properties' in tool_config: properties = tool_config['properties'] log_debug(f"RERANKING: Creating dynamic schema from LaunchDarkly: {properties}") - - # Build Pydantic field definitions from LaunchDarkly schema - field_definitions = {} - required = set(tool_config.get('required') or []) - - for field_name, field_config in properties.items(): - field_description = field_config.get('description', '') - - # Map LaunchDarkly types to Python types - if field_config.get('type') == 'array': - field_type = List[Dict[str, Any]] # For results array - elif field_config.get('type') == 'string': - field_type = str - else: - field_type = str # Default - - # Create Pydantic field - if field_name in required: - field_definitions[field_name] = (field_type, Field(description=field_description)) - else: - field_definitions[field_name] = (Optional[field_type], Field(default=None, description=field_description)) - - # Create dynamic Pydantic model - DynamicRerankingInput = create_model('DynamicRerankingInput', **field_definitions) - + DynamicRerankingInput = _build_args_schema('DynamicRerankingInput', tool_config) else: # Fallback to minimal schema matching LaunchDarkly log_debug(f"RERANKING: No LaunchDarkly config found, using minimal schema") diff --git a/tools_impl/search_v1.py b/tools_impl/search_v1.py index 4c99c89..51a89b7 100644 --- a/tools_impl/search_v1.py +++ b/tools_impl/search_v1.py @@ -1,11 +1,12 @@ -from langchain.tools import BaseTool +from langchain_core.tools import BaseTool from data.vector_store import VectorStore -from typing import Any +from typing import Any, Optional from pydantic import BaseModel, Field class SearchV1Input(BaseModel): """Input schema for search_v1 tool""" query: str = Field(description="Search query to find relevant documentation") + top_k: Optional[int] = Field(default=5, description="Number of results to return") class SearchToolV1(BaseTool): name: str = "search_v1" @@ -20,12 +21,13 @@ def __init__(self): if not self.vector_store.exists(): raise ValueError("Vector embeddings not initialized. Run 'uv run initialize_embeddings.py' first.") - def _run(self, query: str) -> str: + def _run(self, query: str, top_k: Optional[int] = 5, **kwargs: Any) -> str: try: # Get all chunks from persistent store and do keyword search if not self.vector_store.documents: return "No documentation available." + limit = max(1, int(top_k)) if top_k is not None else 5 query_lower = query.lower() matching_chunks = [] @@ -39,13 +41,13 @@ def _run(self, query: str) -> str: # Format results showing chunk matches result = f"Found {len(matching_chunks)} matching text chunks:\n\n" - for i, (chunk_id, chunk_text) in enumerate(matching_chunks[:5]): + for i, (chunk_id, chunk_text) in enumerate(matching_chunks[:limit]): # Truncate very long chunks for readability display_text = chunk_text[:500] + "..." if len(chunk_text) > 500 else chunk_text result += f"[Chunk {chunk_id}] {display_text}\n\n" - if len(matching_chunks) > 5: - result += f"... and {len(matching_chunks) - 5} more chunks" + if len(matching_chunks) > limit: + result += f"... and {len(matching_chunks) - limit} more chunks" return result diff --git a/tools_impl/search_v2.py b/tools_impl/search_v2.py index bca4aca..42aa6fd 100644 --- a/tools_impl/search_v2.py +++ b/tools_impl/search_v2.py @@ -59,10 +59,11 @@ def __init__(self, **data: Any): # Lazy init; will raise a clean error on first use if uninitialized self.vector_store = None - def _run(self, query: str, top_k: int = 3, **kwargs) -> str: + def _run(self, query: str, top_k: Optional[int] = 3, **kwargs) -> str: try: - # clamp for safety (in case someone bypasses args_schema) - top_k = max(1, min(int(top_k), 20)) + # clamp for safety (in case someone bypasses args_schema or passes explicit null) + resolved_top_k = 3 if top_k is None else int(top_k) + top_k = max(1, min(resolved_top_k, 20)) min_score = 0.20 # Default minimum similarity score results = _cached_search(query, top_k, min_score) From a107f05a2eca7c696115565be76abb24149fd218 Mon Sep 17 00:00:00 2001 From: Scarlett Attensil Date: Mon, 23 Nov 2026 10:47:47 -0800 Subject: [PATCH 12/12] fix(review): align bootstrap reranking/top_k schemas with dynamic tools and feedback fallback Co-authored-by: Cursor --- api/main.py | 2 +- bootstrap/create_configs.py | 6 +++--- tests/test_review_fixes.py | 21 ++++++++++++++++++--- tools_impl/dynamic_tool_factory.py | 2 +- 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/api/main.py b/api/main.py index fa5baba..193cbad 100644 --- a/api/main.py +++ b/api/main.py @@ -86,7 +86,7 @@ def _resolve_served_variation( if matched and matched.variation_key and matched.variation_key not in ("unknown", "error", "validation"): return resolved_agent, matched.variation_key, matched.version if feedback.variation_key and feedback.variation_key not in ("unknown", "agent-graph", "error", "validation"): - return target_agent, feedback.variation_key, feedback.version + return resolved_agent, feedback.variation_key, feedback.version return resolved_agent, None, feedback.version diff --git a/bootstrap/create_configs.py b/bootstrap/create_configs.py index 30aa1e0..ed169f5 100644 --- a/bootstrap/create_configs.py +++ b/bootstrap/create_configs.py @@ -337,7 +337,7 @@ def create_tool(self, project_key, tool_data): }, "top_k": { "description": "Number of results to return", - "type": "number" + "type": "integer" } }, "additionalProperties": False, @@ -353,7 +353,7 @@ def create_tool(self, project_key, tool_data): }, "top_k": { "description": "Number of results to return", - "type": "number" + "type": "integer" } }, "additionalProperties": False, @@ -373,7 +373,7 @@ def create_tool(self, project_key, tool_data): } }, "additionalProperties": False, - "required": ["query", "results"] + "required": ["query"] } payload = { diff --git a/tests/test_review_fixes.py b/tests/test_review_fixes.py index ceff8d2..7d96a57 100644 --- a/tests/test_review_fixes.py +++ b/tests/test_review_fixes.py @@ -54,7 +54,7 @@ def search(self, query: str, top_k: int = 3): "type": "object", "properties": { "query": {"type": "string", "description": "Search query for keyword matching"}, - "top_k": {"type": "number", "description": "Number of results to return"}, + "top_k": {"type": "integer", "description": "Number of results to return"}, }, "required": ["query"], }, @@ -67,7 +67,7 @@ def search(self, query: str, top_k: int = 3): "type": "object", "properties": { "query": {"type": "string", "description": "LD query field"}, - "top_k": {"type": "number", "description": "LD top_k field"}, + "top_k": {"type": "integer", "description": "LD top_k field"}, "category": {"type": "string", "description": "Optional category filter"}, }, "required": ["query"], @@ -124,12 +124,27 @@ def search(self, query: str, top_k: int = 3): {"query": "refund", "top_k": None, "category": None} ) - # reranking: with results list and with explicit null results + # reranking: with results list, omitted results, and explicit null results (matching bootstrap schema) + from bootstrap.create_configs import MultiAgentBootstrap + from unittest.mock import patch, MagicMock + + captured_payloads = {} + fake_resp = MagicMock(status_code=201) + fake_resp.json.return_value = {"key": "ok"} + with patch("bootstrap.create_configs.http.post", side_effect=lambda _u, headers=None, json=None, timeout=None: (captured_payloads.setdefault(json["key"], json["schema"]), fake_resp)[1]), patch("bootstrap.create_configs.time.sleep"): + bs = MultiAgentBootstrap("fake-key") + for key in ("search_v1", "search_v2", "reranking"): + bs.create_tool("proj", {"key": key, "name": key, "description": key}) + assert captured_payloads["reranking"]["required"] == ["query"] + assert captured_payloads["search_v1"]["properties"]["top_k"]["type"] == "integer" + assert captured_payloads["search_v2"]["properties"]["top_k"]["type"] == "integer" + sample_results = [{"text": "Refunds within 30 days", "score": 0.8}, {"text": "Edge regions", "score": 0.7}] assert "BM25 reranked results" in rerank_tool.invoke({"query": "refund", "results": sample_results}) assert "BM25 reranked results" in await wrapped["reranking"].ainvoke( {"query": "refund", "results": sample_results} ) + assert "No search results found" in wrapped["reranking"].invoke({"query": "refund"}) assert "No search results found" in wrapped["reranking"].invoke({"query": "refund", "results": None}) diff --git a/tools_impl/dynamic_tool_factory.py b/tools_impl/dynamic_tool_factory.py index bd2295f..9fd493c 100644 --- a/tools_impl/dynamic_tool_factory.py +++ b/tools_impl/dynamic_tool_factory.py @@ -84,7 +84,7 @@ def _json_schema_field_type(field_name: str, field_config: Dict[str, Any]) -> An if schema_type == "integer": return int if schema_type == "number": - return int if field_name == "top_k" else float + return float if schema_type == "boolean": return bool if schema_type == "array":