mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-23 14:04:18 +02:00
Update Anthropic and OpenAI clients to use Omit instead of NotGiven (#3088)
* Fix ty 0.0.15 type errors: use Omit/omit instead of NotGiven/NOT_GIVEN 🤖 Generated with Claude Code https://claude.ai/code/session_01Fs5vHiWaUebe826pGq4eCN * Use kwargs dict to avoid NotGiven/Omit sentinel type issues across SDK versions 🤖 Generated with Claude Code https://claude.ai/code/session_01Fs5vHiWaUebe826pGq4eCN * Bump ty minimum to 0.0.15 🤖 Generated with Claude Code https://claude.ai/code/session_01Fs5vHiWaUebe826pGq4eCN --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
parent
5e0211dd5e
commit
db650ca7cb
5 changed files with 68 additions and 59 deletions
|
|
@ -5,6 +5,7 @@ and don't regress to the slow performance we had before optimization.
|
|||
"""
|
||||
|
||||
import time
|
||||
from typing import Any
|
||||
|
||||
import httpx
|
||||
import pytest
|
||||
|
|
@ -72,7 +73,7 @@ class TestOpenAPIPerformance:
|
|||
for performance testing in CI environments.
|
||||
"""
|
||||
# Create a medium-sized synthetic schema
|
||||
schema = {
|
||||
schema: dict[str, Any] = {
|
||||
"openapi": "3.0.0",
|
||||
"info": {"title": "Test API", "version": "1.0.0"},
|
||||
"paths": {},
|
||||
|
|
@ -81,7 +82,7 @@ class TestOpenAPIPerformance:
|
|||
# Generate multiple paths to create a reasonably sized schema
|
||||
for i in range(100):
|
||||
path = f"/test/{i}"
|
||||
schema["paths"][path] = { # type: ignore[index]
|
||||
schema["paths"][path] = {
|
||||
"get": {
|
||||
"operationId": f"test_{i}",
|
||||
"parameters": [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue