Merge pull request #67 from a-akimov/python-client-model-constant

Refactor the Python client to define the model only once
This commit is contained in:
David Soria Parra 2025-11-10 11:46:33 +00:00 • committed by GitHub
commit 944a709203
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,6 +10,9 @@ from dotenv import load_dotenv
load_dotenv() # load environment variables from .env
# Claude model constant
ANTHROPIC_MODEL = "claude-sonnet-4-5"
class MCPClient:
def __init__(self):
# Initialize session and client objects
@ -64,7 +67,7 @@ class MCPClient:
# Initial Claude API call
response = self.anthropic.messages.create(
model="claude-sonnet-4-5",
model=ANTHROPIC_MODEL,
max_tokens=1000,
messages=messages,
tools=available_tools
@ -97,7 +100,7 @@ class MCPClient:
# Get next response from Claude
response = self.anthropic.messages.create(
model="claude-sonnet-4-5",
model=ANTHROPIC_MODEL,
max_tokens=1000,
messages=messages,
)