Add Native OpenAI-compatible API Support#118
Open
jchristman wants to merge 3 commits intoKeygraphHQ:mainfrom
Open
Add Native OpenAI-compatible API Support#118jchristman wants to merge 3 commits intoKeygraphHQ:mainfrom
jchristman wants to merge 3 commits intoKeygraphHQ:mainfrom
Conversation
Introduce a native OpenAI API path that bypasses the Claude Agent SDK, enabling Shannon to run with local models (minimax, ollama, vLLM) and any OpenAI-compatible endpoint. Summary of changes: Provider infrastructure: - src/ai/provider-config.ts: New provider selection (claude|openai) from AI_PROVIDER env var, with AI_BASE_URL/AI_MODEL/AI_API_KEY support - src/ai/claude-executor.ts: Route to OpenAI executor when provider is openai, passing sourceDir and agentName for tool context OpenAI executor & tools: - src/ai/openai-executor.ts: New OpenAI-compatible execution loop with streaming, tool calls, and turn limits; integrates Shannon helper tools and Playwright MCP - src/ai/openai-tools.ts: Built-in tools (bash, read_file, write_file, edit_file, search_files, list_directory) in OpenAI function format - src/ai/mcp-client.ts: MCP client that invokes save_deliverable and generate_totp directly (no MCP protocol) plus Playwright via stdio MCP server updates: - mcp-server: Export createSaveDeliverableHandler and generateTotp for direct use by OpenAI executor; adjust tool-responses type for compatibility CLI & config: - shannon: Add PROVIDER env var passthrough for docker-compose - .env.example: AI_PROVIDER, AI_BASE_URL, AI_MODEL, AI_API_KEY - CLAUDE.md: Document native OpenAI provider usage - docker-compose.yml: Propagate provider-related env vars Other: - .dockerignore: Additional ignores - prompts: Minor pre-recon-code updates - package.json: New dependencies for OpenAI/MCP integration Co-authored-by: Cursor <cursoragent@cursor.com>
…openai library zod versions
…doesn't end up exhausting resources on the graphics card. Also added more logging to make it so that the values are output in the workflow.log for easy viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fully separate execution pathway parallel to the Anthropic Claude path, enables OpenAI-compatible models without the clumsy CCR translation layer.