mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-10-23 20:23:00 +00:00
fix: Correct Hanzo Node port to 3690
- Fix Hanzo Node health check to use port 3690 (not 8000) - Update chat completions endpoint to use correct port - Fix status display to show correct port number - This allows proper detection and use of local Hanzo Node
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "hanzo"
|
||||
version = "0.3.29"
|
||||
version = "0.3.30"
|
||||
description = "Hanzo AI - Complete AI Infrastructure Platform with CLI, Router, MCP, and Agent Runtime"
|
||||
authors = [
|
||||
{name = "Hanzo AI", email = "[email protected]"},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""Hanzo - Complete AI Infrastructure Platform with CLI, Router, MCP, and Agent Runtime."""
|
||||
|
||||
__version__ = "0.3.29"
|
||||
__version__ = "0.3.30"
|
||||
__all__ = ["main", "cli", "__version__"]
|
||||
|
||||
from .cli import cli, main
|
||||
|
||||
@@ -351,9 +351,9 @@ class EnhancedHanzoREPL:
|
||||
|
||||
# Node status
|
||||
try:
|
||||
response = httpx.get("http://localhost:8000/health", timeout=1)
|
||||
response = httpx.get("http://localhost:3690/health", timeout=1)
|
||||
node_status = "✅ Running" if response.status_code == 200 else "⚠️ Unhealthy"
|
||||
node_details = "Port 8000"
|
||||
node_details = "Port 3690"
|
||||
except:
|
||||
node_status = "❌ Offline"
|
||||
node_details = "Run 'hanzo node start'"
|
||||
|
||||
@@ -42,7 +42,7 @@ class ToolDetector:
|
||||
provider="hanzo-local",
|
||||
priority=0, # Highest priority - local and private
|
||||
check_command=None, # Check via API endpoint
|
||||
api_endpoint="http://localhost:8000/health",
|
||||
api_endpoint="http://localhost:3690/health",
|
||||
env_var=None
|
||||
),
|
||||
AITool(
|
||||
@@ -175,7 +175,7 @@ class ToolDetector:
|
||||
try:
|
||||
# Check if the chat completions endpoint works
|
||||
test_response = httpx.post(
|
||||
"http://localhost:8000/v1/chat/completions",
|
||||
"http://localhost:3690/v1/chat/completions",
|
||||
json={
|
||||
"messages": [{"role": "user", "content": "test"}],
|
||||
"model": "test",
|
||||
@@ -193,7 +193,7 @@ class ToolDetector:
|
||||
|
||||
# Try to get model info
|
||||
try:
|
||||
models_response = httpx.get("http://localhost:8000/v1/models", timeout=1.0)
|
||||
models_response = httpx.get("http://localhost:3690/v1/models", timeout=1.0)
|
||||
if models_response.status_code == 200:
|
||||
models = models_response.json().get("data", [])
|
||||
if models:
|
||||
@@ -342,10 +342,10 @@ class ToolDetector:
|
||||
try:
|
||||
# Special handling for Hanzo services
|
||||
if tool.name == "hanzod":
|
||||
# Use the local API directly with correct endpoint
|
||||
# Use the local API directly with correct endpoint (port 3690)
|
||||
try:
|
||||
response = httpx.post(
|
||||
"http://localhost:8000/v1/chat/completions",
|
||||
"http://localhost:3690/v1/chat/completions",
|
||||
json={
|
||||
"messages": [{"role": "user", "content": prompt}],
|
||||
"model": "default", # Use default model
|
||||
|
||||
Reference in New Issue
Block a user