Skip to content

是否考虑支持embedding模型? #839

@haozhou-wong

Description

@haozhou-wong

最近在配置openclaw的memorySearch时候需要使用embedding模型,然后发现目前claude-code-hub不支持类似v1beta/models/gemini-embedding-001:batchEmbedContents这样的请求,这样的请求不会被识别到gemini格式,而是识别成了claude格式。

ai分析如下:
在 src/app/v1/_lib/proxy/format-mapper.ts:73,Gemini 端点的正则表达式是:

pattern: /^/v1beta/models/[^/:]+:(?:generateContent|streamGenerateContent|countTokens)$/i

它只允许三种 action:

  • generateContent
  • streamGenerateContent
  • countTokens

batchEmbedContents 不在列表中,所以端点格式检测返回 null。

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions