fix: Correct OpenAI CLI syntax for chat completions

- Fix openai CLI command to use correct syntax: chat.completions.create
- Use -g flag instead of -p for message input
- Bump version to 0.3.16

The correct command is now:
openai api chat.completions.create -m gpt-4 -g 'message'
This commit is contained in:
2025-08-19 12:23:01 -05:00
parent 1d867cd7b9
commit a5a7ec5e58
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "hanzo"
version = "0.3.15"
version = "0.3.16"
description = "Hanzo AI - Complete AI Infrastructure Platform with CLI, Router, MCP, and Agent Runtime"
authors = [
{name = "Hanzo AI", email = "[email protected]"},
+1 -1
View File
@@ -26,7 +26,7 @@ from .utils.output import console
from .interactive.repl import HanzoREPL
# Version
__version__ = "0.3.15"
__version__ = "0.3.16"
@click.group(invoke_without_command=True)
+3 -3
View File
@@ -1100,8 +1100,8 @@ Examples:
console.print("Then use: hanzo dev --orchestrator codex")
return
# Use openai CLI to chat
cmd = ["openai", "api", "chat", "-m", "gpt-4", "-p", message]
# Use openai CLI to chat - correct syntax
cmd = ["openai", "api", "chat.completions.create", "-m", "gpt-4", "-g", message]
process = subprocess.Popen(
cmd,
@@ -2336,7 +2336,7 @@ class MultiClaudeOrchestrator(HanzoDevOrchestrator):
try:
import subprocess
result = subprocess.run(
["openai", "api", "chat", "-m", "gpt-4", "-p", prompt],
["openai", "api", "chat.completions.create", "-m", "gpt-4", "-g", prompt],
capture_output=True,
text=True,
timeout=30