vscode使用自定义模型对话

前提条件

先在vscode中安装copilot,并保证其能够正常使用!!

使用方法

vscode下载插件

image-20251105160820201

打开vscode用户的setting.json

ctrl+shift+p 打开上方命令后,按照下图操作:

image-20251105161043692

将以下代码复制到打开的json的最后:

    "oaicopilot.baseUrl": "https://open.bigmodel.cn/api/paas/v4",
	"oaicopilot.models": [
        {
            "id": "glm-4.5-flash",
            "family": "glm",
            "baseUrl": "https://open.bigmodel.cn/api/paas/v4",
            "owned_by": "bigmodel",
            "context_length": 128000,
            "max_tokens": 96000,
            "max_completion_tokens": 96000,
            "enable_thinking": true,
            "temperature": 0.5,
            "repetition_penalty": 1.2
        },
    ],

ps: 至于为什么这么写,看插件作者的仓库 JohnnyZ93/oai-compatible-copilot

apikey获取

智谱AI开放平台

登录后按如下操作得到apikey
image-20251105160523116

使用apikey

依旧是ctrl+shift+p打开命令,然后按如下操作:
image-20251105161754740

选择bigmodel:

image-20251105161828865

粘贴刚刚复制的apikey:

image-20251105161916633

使用模型

image-20251105162000900

image-20251105162013319

把需要的模型打开选上就行了

image-20251105162030681

之后就能正常使用了:

image-20251105162137923

其他

小马算力 注册赠送余额,送的挺多的,模型大多为国产模型 活动结束了QAQ
DeepRouter便宜!!!可选模型较多,gpt/claude等都有

以上平台都可以看看,使用方法与上方配置教程一样~

posted @ 2025-11-11 17:32  ling-yuan  阅读(332)  评论(0)    收藏  举报