Skip to content

docs: clarify API provider config#186

Open
DankerMu wants to merge 2 commits intoAnionex:mainfrom
DankerMu:feature/issue-59-api-config-docs
Open

docs: clarify API provider config#186
DankerMu wants to merge 2 commits intoAnionex:mainfrom
DankerMu:feature/issue-59-api-config-docs

Conversation

@DankerMu
Copy link

Summary

Clarifies how to configure third-party/proxy API providers (base URL and AI_PROVIDER_FORMAT) to reduce migration friction.

Changes

  • README: add concise tips on AI_PROVIDER_FORMAT selection and Base URL pitfalls (/v1 vs /gemini, no trailing /).
  • Note the OpenAI-format image generation 1K limitation and recommend Gemini format for higher resolutions.
  • Point to /settings as a quick validation path.

Closes #59

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @DankerMu, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the project's documentation by providing clearer and more comprehensive guidance on configuring third-party and proxy API providers. The updates aim to reduce user friction during setup, especially concerning AI_PROVIDER_FORMAT and Base URL settings, by addressing common configuration issues and offering practical tips for validation.

Highlights

  • API Provider Configuration: Added detailed tips for configuring AI_PROVIDER_FORMAT and Base URL for third-party/proxy API providers in both Chinese and English READMEs.
  • Base URL Specifics: Clarified common pitfalls for Base URL including the necessity of /v1 for OpenAI-compatible endpoints, its absence for Gemini-native endpoints, and the importance of avoiding trailing slashes.
  • Image Generation Recommendations: Noted the potential 1K resolution limitation for OpenAI-format image generation within the project and recommended using the gemini format for higher resolutions.
  • Configuration Validation: Provided a quick validation method using the /settings page in the web UI to confirm API key/Base URL reachability.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request effectively clarifies the configuration of third-party/proxy API providers in the README files, which will significantly reduce migration friction for users. The added tips regarding AI_PROVIDER_FORMAT selection, Base URL formatting, image generation limitations, and quick validation steps are very helpful and well-explained.

Comment on lines 216 to 222
**第三方 / 代理 API 配置提示(AI_PROVIDER_FORMAT / Base URL)**

- `AI_PROVIDER_FORMAT=openai`:用于 OpenAI 兼容接口(`OPENAI_API_*`),`OPENAI_API_BASE` 通常需要包含 `/v1`(例如 `https://api.openai.com/v1` / `https://xxx/v1`)。
- `AI_PROVIDER_FORMAT=gemini`:用于 Gemini 原生接口或代理(`GOOGLE_API_*`),`GOOGLE_API_BASE` 通常不需要 `/v1`,代理常见是 `https://xxx/gemini`。
- Base URL 末尾不要带 `/`(常见错误:`.../v1/`、`.../gemini/` 会导致路径拼接异常)。
- 图片生成:本项目的 OpenAI 格式图片生成可能限制到 1K 分辨率;需要更高分辨率更建议使用 `gemini` 格式。
- 验证方式:在网页设置页 `/settings` 填写并保存后,尝试生成“大纲”;成功说明 Key/Base 可访问。
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The detailed API configuration tips are repeated in this section, as well as under the '从源码部署' section. While this ensures visibility, it creates redundancy and increases maintenance effort. If these tips need to be updated, they must be changed in multiple places, which can lead to inconsistencies.

Consider consolidating these tips into a single, dedicated 'API Configuration' section and referencing it from both deployment sections. Alternatively, if the repetition is intentional for immediate context, ensure a clear process for keeping all instances synchronized.

Comment on lines 384 to 390
**第三方 / 代理 API 配置提示(AI_PROVIDER_FORMAT / Base URL)**

- `AI_PROVIDER_FORMAT=openai`:用于 OpenAI 兼容接口(`OPENAI_API_*`),`OPENAI_API_BASE` 通常需要包含 `/v1`(例如 `https://api.openai.com/v1` / `https://xxx/v1`)。
- `AI_PROVIDER_FORMAT=gemini`:用于 Gemini 原生接口或代理(`GOOGLE_API_*`),`GOOGLE_API_BASE` 通常不需要 `/v1`,代理常见是 `https://xxx/gemini`。
- Base URL 末尾不要带 `/`(常见错误:`.../v1/`、`.../gemini/` 会导致路径拼接异常)。
- 图片生成:本项目的 OpenAI 格式图片生成可能限制到 1K 分辨率;需要更高分辨率更建议使用 `gemini` 格式。
- 验证方式:在网页设置页 `/settings` 填写并保存后,尝试生成“大纲”;成功说明 Key/Base 可访问。
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This block of API configuration tips is a duplicate of the one found under the '使用 Docker Compose🐳(推荐)' section. Duplication can lead to maintenance challenges and potential inconsistencies if updates are not applied uniformly across all instances.

To improve maintainability, it is recommended to consolidate this information into a single source and refer to it from relevant sections. This ensures that any future changes only need to be made in one place.

Comment on lines 215 to 221
**Third-party / Proxy API configuration tips (AI_PROVIDER_FORMAT / Base URL)**

- `AI_PROVIDER_FORMAT=openai`: for OpenAI-compatible endpoints (`OPENAI_API_*`). `OPENAI_API_BASE` usually needs to include `/v1` (e.g. `https://api.openai.com/v1` or `https://xxx/v1`).
- `AI_PROVIDER_FORMAT=gemini`: for Gemini-native endpoints/proxies (`GOOGLE_API_*`). `GOOGLE_API_BASE` usually does not include `/v1`; proxies commonly look like `https://xxx/gemini`.
- Avoid a trailing `/` in base URLs (common pitfall: `.../v1/`, `.../gemini/` can break path concatenation).
- Image generation: OpenAI-format image generation may be limited to 1K in this project; prefer `gemini` format for higher resolutions.
- Quick validation: use the web UI Settings page at `/settings` — if outline generation works, your key/base URL is reachable.
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The detailed API configuration tips are repeated in this section, as well as under the 'Backend Installation' section. While this ensures visibility, it creates redundancy and increases maintenance effort. If these tips need to be updated, they must be changed in multiple places, which can lead to inconsistencies.

Consider consolidating these tips into a single, dedicated 'API Configuration' section and referencing it from both deployment sections. Alternatively, if the repetition is intentional for immediate context, ensure a clear process for keeping all instances synchronized.

Comment on lines 396 to 402
**Third-party / Proxy API configuration tips (AI_PROVIDER_FORMAT / Base URL)**

- `AI_PROVIDER_FORMAT=openai`: for OpenAI-compatible endpoints (`OPENAI_API_*`). `OPENAI_API_BASE` usually needs to include `/v1` (e.g. `https://api.openai.com/v1` or `https://xxx/v1`).
- `AI_PROVIDER_FORMAT=gemini`: for Gemini-native endpoints/proxies (`GOOGLE_API_*`). `GOOGLE_API_BASE` usually does not include `/v1`; proxies commonly look like `https://xxx/gemini`.
- Avoid a trailing `/` in base URLs (common pitfall: `.../v1/`, `.../gemini/` can break path concatenation).
- Image generation: OpenAI-format image generation may be limited to 1K in this project; prefer `gemini` format for higher resolutions.
- Quick validation: use the web UI Settings page at `/settings` — if outline generation works, your key/base URL is reachable.
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This block of API configuration tips is a duplicate of the one found under the 'Using Docker Compose🐳 (Recommended)' section. Duplication can lead to maintenance challenges and potential inconsistencies if updates are not applied uniformly across all instances.

To improve maintainability, it is recommended to consolidate this information into a single source and refer to it from relevant sections. This ensures that any future changes only need to be made in one place.

- Replace fixed sleep with health polling (60s) via scripts/wait-for-health.sh\n- Soften Base URL trailing-slash wording in docs\n- Clarify 1K image limit note in README_EN
@DankerMu
Copy link
Author

DankerMu commented Jan 26, 2026

Re-review after smoke-test health polling + doc tweaks:

  • ✅ CI is green (Quick Check + Smoke Test).
  • ✅ Smoke test: replacing a fixed sleep with scripts/wait-for-health.sh + an EXIT trap makes the workflow much more reliable and cleans up the backend process.
  • ✅ Docs: the new AI_PROVIDER_FORMAT / Base URL tips (incl. /v1 vs no /v1, trailing-slash pitfalls, and /settings validation) are practical and should reduce setup friction.

Nit (non-blocking): in README_EN.md, the image-gen bullet could be slightly clearer by explicitly saying “1K resolution limit for OpenAI-format image generation” (instead of “limited to 1K in this project”).

LGTM.

Copy link
Author

@DankerMu DankerMu left a comment

Choose a reason for hiding this comment

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

Re-review: CI green; smoke-test health polling + EXIT trap looks solid. Docs additions are helpful. (Nit: consider clarifying “1K resolution limit” wording in README_EN.md.)

@DankerMu
Copy link
Author

Review summary (local)

  • Docs: added concise third-party/proxy API configuration tips (AI_PROVIDER_FORMAT, /v1 vs /gemini, and a quick validation path via /settings).
  • CI: made the PR Smoke Test less flaky by polling /health (up to 60s) instead of a fixed 10s sleep.

LGTM (waiting for CI; maintainer merge required).

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.

new api

1 participant