找回密码
 立即注册
首页 业界区 业界 OpenCode系列---【OpenCode接入白山智算模板】 ...

OpenCode系列---【OpenCode接入白山智算模板】

齐娅晶 9 小时前
1.白山智算api

如果你还在为token费用高而发愁,那么你可以先体验一把白山智算家推出的活动,注册实名制后,就送150元的额度,2026年3月15号之前,首次调用就再送300元,这样下来就送450元了,且额度永久不失效,如果你还觉得不够,你可以通过邀请,邀请一个则送200元,包括MiniMax-M2.5,GLM5等。这个是我目前发现的最有诚意的大模型api三方平台了。注册链接为:https://ai.baishan.com/auth/login?referralCode=TAwCe8f1hp
2.OpenCode接入白山智算模板

把C:\Users\\.config\opencode\opencode.json这个json,替换成下面的即可。
  1. {
  2.     "$schema": "https://opencode.ai/config.json",
  3.     "provider": {
  4.         "baishan": {
  5.             "npm": "@ai-sdk/anthropic",
  6.                 "name": "白山智算",
  7.             "options": {
  8.                 "baseURL": "https://api.edgefn.net/v1",
  9.                 "apiKey": "替换成你自己的api秘钥"
  10.             },
  11.             "models": {
  12.                 "MiniMax-M2.5": {
  13.                     "name": "MiniMax M2.5",
  14.                     "modalities": {
  15.                         "input": ["text"],
  16.                         "output": ["text"]
  17.                     },
  18.                     "options": {
  19.                         "thinking": {
  20.                             "type": "enabled",
  21.                             "budgetTokens": 8192
  22.                         }
  23.                     },
  24.                     "limit": {
  25.                         "context": 196608,
  26.                         "output": 24576
  27.                     }
  28.                 },
  29.                 "GLM-5": {
  30.                     "name": "GLM-5",
  31.                     "modalities": {
  32.                         "input": ["text"],
  33.                         "output": ["text"]
  34.                     },
  35.                     "options": {
  36.                         "thinking": {
  37.                             "type": "enabled",
  38.                             "budgetTokens": 8192
  39.                         }
  40.                     },
  41.                     "limit": {
  42.                         "context": 202752,
  43.                         "output": 16384
  44.                     }
  45.                 },
  46.                 "GLM-4.7": {
  47.                     "name": "GLM-4.7",
  48.                     "modalities": {
  49.                         "input": ["text"],
  50.                         "output": ["text"]
  51.                     },
  52.                     "options": {
  53.                         "thinking": {
  54.                             "type": "enabled",
  55.                             "budgetTokens": 8192
  56.                         }
  57.                     },
  58.                     "limit": {
  59.                         "context": 202752,
  60.                         "output": 16384
  61.                     }
  62.                 },
  63.                 "Kimi-K2-Instruct": {
  64.                     "name": "Kimi-K2-Instruct",
  65.                     "modalities": {
  66.                         "input": ["text", "image"],
  67.                         "output": ["text"]
  68.                     },
  69.                     "options": {
  70.                         "thinking": {
  71.                             "type": "enabled",
  72.                             "budgetTokens": 8192
  73.                         }
  74.                     },
  75.                     "limit": {
  76.                         "context": 262144,
  77.                         "output": 32768
  78.                     }
  79.                 }
  80.             }
  81.         }
  82.     }
  83. }
复制代码
来源:程序园用户自行投稿发布,如果侵权,请联系站长删除
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!

相关推荐

您需要登录后才可以回帖 登录 | 立即注册