Skip to content

examples: add DaoXE OpenAI-compatible gateway client#3504

Open
seven7763 wants to merge 1 commit into
openai:mainfrom
seven7763:examples/add-daoxe-gateway
Open

examples: add DaoXE OpenAI-compatible gateway client#3504
seven7763 wants to merge 1 commit into
openai:mainfrom
seven7763:examples/add-daoxe-gateway

Conversation

@seven7763

Copy link
Copy Markdown

Summary

  • Add a small example using the official OpenAI client with DaoXE (base_url=https://daoxe.com/v1).
  • Multi-model multi-protocol gateway; Chat Completions path; account-scoped model IDs; not available in mainland China.

Disclosure: I am affiliated with DaoXE.

@seven7763 seven7763 requested a review from a team as a code owner July 14, 2026 18:44

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b5816415e3

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread examples/daoxe_gateway.py
Comment on lines +19 to +21
# Or set OPENAI_BASE_URL / OPENAI_API_KEY
base_url=os.environ.get("DAOXE_BASE_URL", "https://daoxe.com/v1"),
api_key=os.environ["DAOXE_API_KEY"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor the documented OpenAI env vars

When a user follows this comment and sets OPENAI_BASE_URL/OPENAI_API_KEY instead of the DAOXE_* variables, the script still evaluates os.environ["DAOXE_API_KEY"] during client construction and raises KeyError before the client can use OPENAI_API_KEY; it also always passes a base_url, so OPENAI_BASE_URL is ignored. Either remove the comment or fall back to the documented env vars so the example works in that advertised setup.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant