Skip to content

Add OpenAIProvider and AGENTS.md; default to OpenAI for Codex runs - #5

Open
tuhinkanti wants to merge 6 commits into
mainfrom
codex/create-agents.md-for-codex-setup
Open

Add OpenAIProvider and AGENTS.md; default to OpenAI for Codex runs#5
tuhinkanti wants to merge 6 commits into
mainfrom
codex/create-agents.md-for-codex-setup

Conversation

@tuhinkanti

Copy link
Copy Markdown
Owner

Motivation

  • Make the project runnable with the fewest code changes for Codex users by preferring OpenAI as the default provider.
  • Provide a minimal, explicit run guide and a low-LOC change policy so subsequent edits stay small and deterministic.

Description

  • Add AGENTS.md with a Codex-focused quick run and change policy for low-friction runs using OPENAI_API_KEY.
  • Add OpenAIProvider (src/main/java/ai/openclaw/agent/OpenAIProvider.java) implementing LlmProvider using the OpenAI Chat Completions API for simple text completions.
  • Wire provider selection in the gateway via a new createProvider helper in GatewayCommand so anthropic remains supported but the default is openai.
  • Change config defaults in OpenClawConfig to provider = "openai" and model = "gpt-4o-mini", and update ConfigLoader to prefer OPENAI_API_KEY with a fallback to ANTHROPIC_API_KEY.
  • Update README.md examples and Docker run instructions to reflect the OpenAI-first defaults.

Testing

  • Ran ./gradlew build to validate the build, which failed in this environment due to a missing Java 21 toolchain (toolchain auto-provisioning not configured).

Codex Task

Comment thread src/main/java/ai/openclaw/config/OpenClawConfig.java
Comment thread README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant