mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-20 04:24:17 +02:00
Use claude-sonnet-4-5-20250929 model name
This commit is contained in:
parent
179874628e
commit
5d57f5bd0f
7 changed files with 7 additions and 7 deletions
|
|
@ -287,7 +287,7 @@ from fastmcp import Client
|
|||
from fastmcp.server.sampling.anthropic import AnthropicSamplingHandler
|
||||
|
||||
handler = AnthropicSamplingHandler(
|
||||
default_model="claude-sonnet-4-20250514",
|
||||
default_model="claude-sonnet-4-5-20250929",
|
||||
client=Anthropic(), # Uses ANTHROPIC_API_KEY env var
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -466,7 +466,7 @@ from fastmcp.server.sampling.anthropic import AnthropicSamplingHandler
|
|||
server = FastMCP(
|
||||
name="Sampling Server",
|
||||
sampling_handler=AnthropicSamplingHandler(
|
||||
default_model="claude-sonnet-4-20250514",
|
||||
default_model="claude-sonnet-4-5-20250929",
|
||||
),
|
||||
sampling_handler_behavior="fallback",
|
||||
)
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class LoggingAnthropicHandler(AnthropicSamplingHandler):
|
|||
|
||||
mcp = FastMCP(
|
||||
"Server with Fallback",
|
||||
sampling_handler=LoggingAnthropicHandler(default_model="claude-sonnet-4-20250514"),
|
||||
sampling_handler=LoggingAnthropicHandler(default_model="claude-sonnet-4-5-20250929"),
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ async def main():
|
|||
)
|
||||
console.print()
|
||||
|
||||
handler = LoggingAnthropicHandler(default_model="claude-sonnet-4-20250514")
|
||||
handler = LoggingAnthropicHandler(default_model="claude-sonnet-4-5-20250929")
|
||||
|
||||
test_texts = [
|
||||
("I love this! Best purchase ever!", "😊"),
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ async def main():
|
|||
)
|
||||
console.print()
|
||||
|
||||
handler = LoggingAnthropicHandler(default_model="claude-sonnet-4-20250514")
|
||||
handler = LoggingAnthropicHandler(default_model="claude-sonnet-4-5-20250929")
|
||||
|
||||
async with Client(mcp, sampling_handler=handler) as client:
|
||||
# Example 1
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ async def main():
|
|||
)
|
||||
console.print()
|
||||
|
||||
handler = LoggingAnthropicHandler(default_model="claude-sonnet-4-20250514")
|
||||
handler = LoggingAnthropicHandler(default_model="claude-sonnet-4-5-20250929")
|
||||
|
||||
questions = [
|
||||
"What's 15% tip on a $47.50 bill?",
|
||||
|
|
|
|||
|
|
@ -294,7 +294,7 @@ class AnthropicSamplingHandler:
|
|||
"claude-3-5-sonnet-20240620",
|
||||
"claude-3-5-sonnet-20241022",
|
||||
"claude-3-5-haiku-20241022",
|
||||
"claude-sonnet-4-20250514",
|
||||
"claude-sonnet-4-5-20250929",
|
||||
"claude-opus-4-5-20251101",
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue