Skip to content

docs: align plugin references with current behavior - #13864

Open
Yilialinn wants to merge 2 commits into
apache:masterfrom
Yilialinn:codex/audit-declining-plugin-docs
Open

docs: align plugin references with current behavior#13864
Yilialinn wants to merge 2 commits into
apache:masterfrom
Yilialinn:codex/audit-declining-plugin-docs

Conversation

@Yilialinn

@Yilialinn Yilialinn commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • correct the proxy-rewrite regex, curl, and request-header examples in English and Chinese
  • align Prometheus metric availability and label semantics with the current exporter, including LLM, AI cache, Stream, and response-source metrics
  • document limit-count rule conflicts, unique rule keys, quota headers, delayed synchronization fallback, and Redis Sentinel keepalive defaults

Validation

  • markdownlint-cli@0.25.0 on all six changed documents
  • AutoCorrect on the three Chinese documents
  • category and Chinese sentence-segmentation checks
  • git diff --check
  • APISIX website and documentation preview builds
  • desktop and mobile preview checks for all six pages
  • independent technical review against the current Lua implementation and tests: no remaining P0, P1, or P2 findings

Scope

This is a documentation-only change. It does not modify plugin behavior, public APIs, titles, descriptions, URLs, or canonical mappings. Plugin documentation continues to use the existing API7 canonical targets.

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. doc Documentation things labels Aug 21, 2026
@Yilialinn
Yilialinn requested a balanced review from Copilot August 21, 2026 09:12

Copilot AI 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.

Pull request overview

Updates English and Chinese plugin documentation to better reflect current runtime behavior.

Changes:

  • Corrects proxy-rewrite examples.
  • Expands Prometheus metric and label documentation.
  • Clarifies limit-count rules, headers, synchronization, and Redis defaults.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
docs/en/latest/plugins/proxy-rewrite.md Corrects English rewrite and header examples.
docs/zh/latest/plugins/proxy-rewrite.md Mirrors proxy-rewrite corrections in Chinese.
docs/en/latest/plugins/prometheus.md Expands English metrics documentation.
docs/zh/latest/plugins/prometheus.md Expands Chinese metrics documentation.
docs/en/latest/plugins/limit-count.md Clarifies English rate-limit behavior.
docs/zh/latest/plugins/limit-count.md Mirrors limit-count clarifications in Chinese.
Suppressed comments (4)

docs/en/latest/plugins/limit-count.md:65

  • This requirement applies only to the numeric top-level time_window. Numeric rules.time_window values are not rejected when they are less than or equal to sync_interval; the runtime takes the same direct-synchronization fallback as it does for resolved dynamic values. As written, valid rules-mode configurations are documented as invalid.
| sync_interval           | number            | False                                     | -1            | -1 or >= 0.1               | The delayed synchronization interval in seconds for Redis-based policies. Set to `-1` to synchronize on every request. A positive value must be smaller than a numeric `time_window`; if a dynamic `time_window` resolves to a value less than or equal to `sync_interval`, APISIX synchronizes that request directly. |

docs/zh/latest/plugins/limit-count.md:66

  • 该限制只适用于顶层的数值型 time_window。当数值型 rules.time_window 小于或等于 sync_interval 时,配置不会被拒绝;运行时会像动态值一样回退为直接同步。当前表述会把有效的规则模式配置描述为无效。
| sync_interval | number | 否 | -1 | -1 或 >= 0.1 | Redis 类策略的延迟同步间隔,单位为秒。设置为 `-1` 时,每个请求都会与 Redis 同步。正数值必须小于数值型 `time_window`;如果动态 `time_window` 解析后的值小于或等于 `sync_interval`,APISIX 会对该请求直接同步。 |

docs/en/latest/plugins/prometheus.md:134

  • This gauge does not currently remain an active-connection count when ai-proxy-multi falls back. Every retry re-enters the loop and increments at apisix/plugins/ai-proxy/base.lua:498, while apisix/plugins/ai-proxy-multi.lua:1053-1055 decrements only once in log phase. A failed instance's labeled series therefore stays positive indefinitely with the default non-expiring metrics, so the documented meaning is inaccurate until per-attempt tracking is balanced.
| apisix_llm_active_connections         | gauge     | Number of active connections to LLM services.                                                                                                      |

docs/zh/latest/plugins/prometheus.md:134

  • ai-proxy-multi 回退重试时,该 gauge 目前无法持续表示活跃连接数。每次重试都会重新进入循环并在 apisix/plugins/ai-proxy/base.lua:498 递增,但 apisix/plugins/ai-proxy-multi.lua:1053-1055 在日志阶段只递减一次。因此失败实例对应的标签序列会在默认永不过期的指标中永久保持正值;在按尝试配平计数前,这里的语义并不准确。
| apisix_llm_active_connections | gauge | 到 LLM 服务的活跃连接数。                                                                                                                                             |

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/en/latest/plugins/limit-count.md Outdated
Comment thread docs/zh/latest/plugins/limit-count.md Outdated
Comment thread docs/zh/latest/plugins/prometheus.md Outdated
Comment thread docs/en/latest/plugins/prometheus.md Outdated
Comment thread docs/zh/latest/plugins/prometheus.md Outdated

Copilot AI 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.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

@Yilialinn
Yilialinn requested a review from kayx23 August 21, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Documentation things size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants