Skip to content

docs: add pipeline extension recipe (kie.ai content:null workaround)#1708

Closed
lennney wants to merge 2 commits into
headroomlabs-ai:mainfrom
lennney:docs/pipeline-extension-recipe
Closed

docs: add pipeline extension recipe (kie.ai content:null workaround)#1708
lennney wants to merge 2 commits into
headroomlabs-ai:mainfrom
lennney:docs/pipeline-extension-recipe

Conversation

@lennney

@lennney lennney commented Jul 2, 2026

Copy link
Copy Markdown

Description

Documents the headroom.pipeline_extension entry-point system that was previously only discoverable by reading source code. Adds a recipe-style guide covering available pipeline stages, entry-point registration, and a real-world example (normalizing content: null → content: "" for kie.ai Gemini endpoints).

Closes #1697

Type of Change

  • Documentation update

Changes Made

  • New docs/content/docs/pipeline-extensions.mdx — 147 lines covering:
    • When to use a pipeline extension
    • All pipeline stages table with use cases
    • Complete recipe for kie.ai content: null workaround
    • Entry-point registration (pyproject.toml)
    • --proxy-extension CLI flag + x-headroom-base-url routing
    • Extension contract + troubleshooting
  • docs/content/docs/meta.json — register new page under Proxy Server section (+1 line)

Testing

  • No code changes — docs-only PR
  • Markdown renders correctly (verified locally)
  • meta.json JSON is valid
  • PR diff is scoped to 2 doc files only

Test Output

$ git diff --stat upstream/main...HEAD
 docs/content/docs/meta.json               | 1 +
 docs/content/docs/pipeline-extensions.mdx | 147 ++++++++++++++++++++++++++++++
 2 files changed, 148 insertions(+)

Real Behavior Proof

  • Environment: headroom docs framework (Nextra, MDX)
  • Exact command / steps: git diff upstream/main...HEAD -- docs/
  • Observed result: 2 files changed, 148 insertions, 0 deletions. Only docs/ touched.
  • Not tested: Full docs site npm run build (requires Node.js build environment)

Review Readiness

  • I have performed a self-review
  • This PR is ready for human review

Document the headroom.pipeline_extension entry-point system with:
- Available pipeline stages and when to use each
- Complete recipe: normalize content:null → content:"" for kie.ai
- Entry point registration instructions
- --proxy-extension CLI flag usage
- x-headroom-base-url per-request routing header
- Extension contract and troubleshooting

Closes headroomlabs-ai#1697
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

PR governance

This PR follows the template and is marked ready for human review.

@github-actions github-actions Bot added status: needs author action Pull request body or readiness checklist still needs author updates status: ready for review Pull request body is complete and the author marked it ready for human review and removed status: needs author action Pull request body or readiness checklist still needs author updates labels Jul 2, 2026

@JerrettDavis JerrettDavis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for writing this up. I think this should not merge in its current form because it conflates two different extension systems.

headroom.pipeline_extension is loaded by PipelineExtensionManager through discover_pipeline_extensions; the --proxy-extension flag and HEADROOM_PROXY_EXTENSIONS environment variable enable entries from the separate headroom.proxy_extension group, whose install call receives the FastAPI app/config. Documenting --proxy-extension kie-ai-compat for a headroom.pipeline_extension entry point will leave users with an extension that never runs.

A newer docs PR, #1712, covers the same issue without mixing those extension mechanisms and also documents x-headroom-base-url. My recommendation is to close this PR in favor of #1712, or revise it to clearly separate pipeline extensions from proxy extensions before it is considered again.

@lennney

lennney commented Jul 3, 2026

Copy link
Copy Markdown
Author

Closing per maintainer recommendation — superseded by #1712 which covers the same issue without mixing pipeline/proxy extension mechanisms.

@lennney lennney closed this Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: ready for review Pull request body is complete and the author marked it ready for human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Document/support pattern for fixing upstream provider quirks via pipeline_extension (e.g. kie.ai rejecting content: null on tool_calls)

2 participants