Claude+qwen3-vl:8B HTTP交互信息解释

Claude Code的控制台客户端安装

复制代码
npm install -g @anthropic-ai/claude-code

Ollama的安装,并拉取qwen3-vl:8B的模型

复制代码
ollama pull qwen3-vl:8B

ollama作为service启动后,默认只开启在127.0.0.1端口上,需要修改服务配置达成到0.0.0.0

打开控制台,修改环境变量,而后启动claude

复制代码
export ANTHROPIC_AUTH_TOKEN=ollama
export ANTHROPIC_BASE_URL=http://192.168.1.190:11434 //本地安装的ollama服务
claude

启动后,会和http服务器进行一次http交互,只是确认服务的存在。

进入控制台后选择模型

复制代码
/model qwen3-vl:8B

----------HTTPRequest-----------
POST / v1 / messages ? beta = true HTTP / 1.1
host: localhost: 11434
connection: keep - alive
Accept: application / json
X - Stainless - Retry - Count: 0
X - Stainless - Timeout: 600
X - Stainless - Lang: js
X - Stainless - Package - Version: 0.81 .0
X - Stainless - OS: MacOS
X - Stainless - Arch: x64
X - Stainless - Runtime: node
X - Stainless - Runtime - Version: v22 .4 .1
anthropic - dangerous - direct - browser - access: true
anthropic - version: 2023 - 06 - 01
x - app: cli
User - Agent: claude - cli / 2.1 .110(external, cli)
X - Claude - Code - Session - Id: 745 a401e - a7a4 - 4 aba - 830e- b63bf409bedb
Authorization: Bearer ollama
content - type: application / json
anthropic - beta: claude - code - 20250219, interleaved - thinking - 2025 - 05 - 14, redact - thinking - 2026 - 02 - 12, context - management - 2025 - 06 - 27, prompt - caching - scope - 2026 - 01 - 05
accept - language: *
	sec - fetch - mode: cors
accept - encoding: gzip, deflate
content - length: 533

{
	"model": "qwen3-vl:8B",
	"max_tokens": 1,
	"system": [{
		"type": "text",
		"text": "x-anthropic-billing-header: cc_version=2.1.110.610; cc_entrypoint=cli; cch=00000;"
	}, {
		"type": "text",
		"text": "You are Claude Code, Anthropic's official CLI for Claude."
	}],
	"messages": [{
		"role": "user",
		"content": [{
			"type": "text",
			"text": "Hi",
			"cache_control": {
				"type": "ephemeral"
			}
		}]
	}],
	"metadata": {
		"user_id": "{\"device_id\":\"b1581fe7235e6eed0f44c26a8c26d7fc1c704ce894c977cb770f421cf7720923\",\"account_uuid\":\"\",\"session_id\":\"745a401e-a7a4-4aba-830e-b63bf409bedb\"}"
	}
}


----------HTTPResponse-----------
HTTP / 1.1 200 OK
Content - Type: application / json
Date: Fri, 17 Apr 2026 07: 31: 04 GMT
Content - Length: 219

{
	"id": "msg_c1a7f4c4be5ae8ca4843bd20",
	"type": "message",
	"role": "assistant",
	"model": "qwen3-vl:8B",
	"content": [{
		"type": "thinking",
		"thinking": "Okay"
	}],
	"stop_reason": "max_tokens",
	"usage": {
		"input_tokens": 67,
		"output_tokens": 1
	}
}

确认大模型端对qwen3-vl:8B的支持,此时也会该Session创建了唯一性的session编号。

提问: 创建文件index.html

两个HTTP交互见附件

  1. claude向qwen3-vl发起问题,提交<system-reminder>的提示词,模型指定命令<command-name>/model</command-name>,用户问题

{

"type": "text",

"text": "创建文件index.html",

"cache_control": {

"type": "ephemeral"

}

},通过tools":表达技能能力。qwen进行llm分析后,最终会回复tool use的调用

data: {

"type": "content_block_start",

"index": 0,

"content_block": {

"type": "tool_use",

"id": "call_ooye05av",

"name": "Write",

"input": {}

}

}

  1. 本地调用工具执行后,claude再次发起交互,汇报工具调用结果,

"content": [{

"tool_use_id": "call_ooye05av",

"type": "tool_result",

"content": "File created successfully at: /Users/xuxin/index.html",

"cache_control": {

"type": "ephemeral"

}

}] qwen返回结果描述以及后续建议。

如有部署疑问和私信沟通。也可浏览agent-llm概念文章

相关推荐
DLYSB_21 小时前
基于 HTTP API 与 Modbus 协议的多源监控声光语音联动告警系统设计与实现
网络·网络协议·http·报警灯
码哥字节21 小时前
Anthropic 官方的 7 种 Claude Code 自定义方式,你可能只用对了 1 种
ai编程·claude·mcp
Claude实战手记1 天前
时间口径错了,你的自动化就在系统性造假
claude
小邓的技术笔记1 天前
解析 gin 接收到 http 请求是怎么处理的
网络协议·http·gin
TlSfoward1 天前
TLSFOWARD抓包工具 TLS指纹
网络协议·http·百度·https
TrisighT1 天前
Skill 写成 2000 字说明书?Claude 根本不读——路由器思维与渐进式披露
aigc·ai编程·claude
Flynt1 天前
MCP让Claude连上外部世界,我踩了5个坑才跑通
ai编程·claude·mcp
武子康1 天前
Fable 5 的 7 月 19 日不是发布延期:模型可用性正在变成动态资源(九维可用性 + SLO 重构)
人工智能·chatgpt·claude
测试员周周2 天前
【skills5】一份 spec 生成 k6/JMeter/Locust:性能压测 + 全站截图,上线前的双保险
功能测试·网络协议·测试工具·jmeter·http·自动化·集成测试
逐梦苍穹2 天前
Claude Code 迁移 Codex 实战复盘:基于 15 天本地日志分析使用量、信任成本与失败地图
prompt·claude·codex·claudecode