-
Notifications
You must be signed in to change notification settings - Fork 59
[Feature Request] Support both baseUrl and baseURL in config / 配置支持 baseUrl 和 baseURL 两种写法 #31
Description
Problem / 问题
The embedding configuration uses baseURL (with capital URL), but OpenClaw's official configuration and many other plugins use baseUrl (camelCase). This inconsistency can cause confusion and configuration errors.
embedding 配置使用 baseURL(大写 URL),但 OpenClaw 官方配置和大多数插件使用 baseUrl(小驼峰)。这种不一致会导致混淆和配置错误。
Current Behavior / 当前行为
Only baseURL is recognized:
仅 baseURL 被识别:
{
"embedding": {
"baseURL": "https://...", // ✅ Works / 有效
"apiKey": "...",
"model": "text-embedding-v4"
}
}Using baseUrl (following OpenClaw convention) fails silently and falls back to FTS5 mode:
使用 baseUrl(遵循 OpenClaw 约定)会静默失败并回退到 FTS5 模式:
{
"embedding": {
"baseUrl": "https://...", // ❌ Not recognized, no error / 不被识别,无错误提示
"apiKey": "...",
"model": "text-embedding-v4"
}
}Real-World Impact / 实际影响
I spent ~30 minutes debugging why vector search wasn't working, only to discover it was a case sensitivity issue in the config key. Since OpenClaw's official docs and most plugins use baseUrl, this is an easy mistake to make.
我花了约 30 分钟调试为什么向量搜索不工作,最后发现是配置键的大小写问题。由于 OpenClaw 官方文档和大多数插件都使用 baseUrl,这个错误很容易犯。
Proposed Solution / 建议方案
Support both baseUrl and baseURL for backward compatibility and consistency with OpenClaw conventions:
同时支持 baseUrl 和 baseURL,以保持向后兼容性和与 OpenClaw 约定的一致性:
// In config resolution logic / 在配置解析逻辑中
const baseURL = config.baseURL ?? config.baseUrl;Benefits / 好处
-
✅ Consistency - Aligns with OpenClaw's camelCase convention
一致性 - 与 OpenClaw 的小驼峰约定对齐 -
✅ Backward Compatible - Existing configs with
baseURLcontinue to work
向后兼容 - 现有使用baseURL的配置继续有效 -
✅ User-Friendly - Reduces configuration errors and debugging time
用户友好 - 减少配置错误和调试时间 -
✅ No Breaking Changes - Purely additive change
无破坏性变更 - 纯增量改动
Additional Context / 补充信息
-
OpenClaw official config uses
baseUrl: https://docs.openclaw.ai/providers/overview
OpenClaw 官方配置使用baseUrl:https://docs.openclaw.ai/providers/overview -
Most OpenClaw plugins follow camelCase convention
大多数 OpenClaw 插件遵循小驼峰约定 -
This affects both
config.llm.baseURLandconfig.embedding.baseURL
这同时影响config.llm.baseURL和config.embedding.baseURL
Willing to Help / 愿意协助
Happy to submit a PR if this is accepted. The change should be minimal - just adding fallback logic in the config resolution.
如果这个建议被接受,我很乐意提交 PR。改动应该很小——只需在配置解析中添加回退逻辑。
Environment / 环境:
- graph-memory: v1.5.6
- OpenClaw: v2026.3.24
- Node.js: v22.22.2
Reported by / 报告者: Maxwell Li & Agent-Max