Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Capture descriptions: support any OpenAI-compatible vision endpoint

未关闭
#4,846 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@FenjuFu 已经在做这个了。

开始于 2026年10月1日。

  • #4849 来自 @FenjuFu —— 未关闭

评估

难度
4/5
预计耗时
3-5 天
新手友好度
30/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript
领域
ai, cli

调研方向

Start in packages/cli/src/capture/contentExtractor.ts, focusing on captionImagesWithGemini and the existing OpenRouter request branch. Trace postExtractionPhase to understand credential detection and degraded reporting. Done means custom endpoint credentials are handled as specified, OpenRouter behavior remains unchanged, and the no-credentials guidance mentions the custom endpoint.

由索引模型根据 Issue 内容生成。

描述

Problem

hyperframes capture describes downloaded images only through OpenRouter, Vertex or the Gemini API (captionImagesWithGemini in packages/cli/src/capture/contentExtractor.ts). None of them is reliably reachable from mainland China, and none can point at a self-hosted vision model. Users in that position get the catalog-fallback asset-descriptions.md on every capture, even when they already pay for an OpenAI-compatible vision endpoint or run one locally.

Proposed solution

Bring back the three variables from #1809 on current main: HYPERFRAMES_VISION_BASE_URL, HYPERFRAMES_VISION_API_KEY and HYPERFRAMES_VISION_MODEL.

  • All three set: caption through <base>/chat/completions with the OpenAI-style request the OpenRouter branch already sends, ahead of OpenRouter, Vertex and Gemini.
  • Some but not all set: warn naming the missing variables (never echoing values), skip captioning, and report the phase as degraded. Never fall back to another provider.
  • OpenRouter shares the same request helper and keeps its URL, auth header and error text unchanged.
  • postExtractionPhase counts a complete custom endpoint as vision credentials, and the no-credentials hint mentions it.

I have this ready and will open a PR that links here.

Alternatives considered

A named preset per regional provider. Every one of them speaks the same chat-completions wire format, so a single base-URL setting covers them all and also covers local Ollama and vLLM.

Additional context

The #1809 review called the base-URL approach "the right shape" and asked for one fix: setting only some of the variables fell through silently and could caption through Gemini, the provider the user is trying to avoid. That PR was closed for merge conflicts and inactivity, before Vertex support (#3561) landed in the same function.

To check that the request shape works outside OpenRouter, I sent exactly what the OpenRouter branch builds today (one image_url data URI, the storyboard prompt, max_tokens: 500) to iFlytek Astron's Token Plan, an OpenAI-compatible endpoint (https://maas-token-api.cn-huabei-1.xf-yun.com/v2). The image was docs/images/image-thumbnail-evidence/after.png.

Model HTTP finish Caption
xopkimik26 (Kimi-K2.6) 200 stop A dark gray webpage displays white text reading "Timeline JPEG thumbnail resource check" with a horizontal strip of rainbow-colored vertical bars beneath it.
xopqwen35397b (Qwen3.5-397B) 200 stop A dark background displays a horizontal strip of repeating colorful vertical bars labeled "Synthetic JPEG chart" …
xopqwen36v35b (Qwen3.6-35B) 200 stop A dark-background interface displays a narrow, horizontally stretched bar of repeating rainbow-colored vertical stripes …
spark-x2.5 (text-only) 400 invalid request

None of the vision models spent the 500-token budget on reasoning. The text-only row is why the docs should say to choose a model that accepts image input.

主要语言
TypeScript
星标
54.1k
派生
4.9k
平均合并
7 小时 18 分钟
30 天内合并 PR
784

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

heygen-com/hyperframes 的其他 Issue

查看 heygen-com/hyperframes 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。