fix: use internal URL for AI HTTP tools

Prefer IA_WEB_INTERNAL_URL or local HOST for AI tool requests while preserving public page links for users.
This commit is contained in:
2026-07-08 00:03:14 +08:00
parent 640ba9e7d2
commit 279d89b87a
9 changed files with 62 additions and 13 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "ias-service"
version = "0.1.12"
version = "0.1.13"
edition = "2024"
[dependencies]
@@ -0,0 +1,34 @@
INSERT INTO ias_upgrade_logs (
version,
released_at,
title,
description,
changes,
modules
) VALUES (
'0.2.16',
'2026-07-07T00:00:00+08:00',
'修复 AI 页面工具内部访问地址',
'修复 AI 内置页面工具在公开地址受 NetBird 鉴权保护时无法创建 Markdown 预览页的问题,内部请求改为优先使用内部地址或本地服务地址。',
'[
"修复 AI 内置页面工具在配置了受保护公开地址时,请求 /v1/web/pages 命中 NetBird 鉴权页并返回 401 的问题。",
"create_web_page、create_markdown_preview、query_web_pages 的内部 HTTP 请求现在优先使用 IA_WEB_INTERNAL_URL 或本地 HOST;返回给用户的页面链接仍优先使用 IA_WEB_BASE_URL。",
"query_api_docs 同步优先使用内部地址查询 API 文档,避免内部工具调用被公开入口鉴权拦截。",
"无数据库结构变化;ias-ai 升级至 0.1.6ias-service 升级至 0.1.13。"
]'::jsonb,
'{
"ias-common": "0.1.1",
"ias-ai": "0.1.6",
"ias-wechat": "0.1.0",
"ias-context": "0.1.2",
"ias-http": "0.1.9",
"ias-mail": "0.1.15",
"ias-service": "0.1.13",
"ias-main": "0.2.16"
}'::jsonb
) ON CONFLICT (version) DO UPDATE SET
released_at = EXCLUDED.released_at,
title = EXCLUDED.title,
description = EXCLUDED.description,
changes = EXCLUDED.changes,
modules = EXCLUDED.modules;