File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -209,6 +209,17 @@ export namespace Provider {
209209 } ,
210210 }
211211 } ,
212+ zenmux : async ( ) => {
213+ return {
214+ autoload : false ,
215+ options : {
216+ headers : {
217+ "HTTP-Referer" : "https://opencode.ai/" ,
218+ "X-Title" : "opencode" ,
219+ } ,
220+ } ,
221+ }
222+ } ,
212223 }
213224
214225 const state = Instance . state ( async ( ) => {
Original file line number Diff line number Diff line change @@ -957,6 +957,58 @@ monitor and improve Grok Code.
957957
958958---
959959
960+ ### ZenMux
961+
962+ 1 . Head over to the [ ZenMux dashboard] ( https://zenmux.ai/settings/keys ) , click ** Create API Key** , and copy the key.
963+
964+ 2 . Run ` opencode auth login ` and select ZenMux.
965+
966+ ``` bash
967+ $ opencode auth login
968+
969+ ┌ Add credential
970+ │
971+ ◆ Select provider
972+ │ ● ZenMux
973+ │ ○ Zhipu AI
974+ │ ○ Zhipu AI Coding Plan
975+ │ ...
976+ └
977+ ```
978+
979+ 3 . Enter the API key for the provider.
980+
981+ ``` bash
982+ $ opencode auth login
983+
984+ ┌ Add credential
985+ │
986+ ◇ Select provider
987+ │ ZenMux
988+ │
989+ ◇ Enter your API key
990+ │ _
991+ └
992+ ```
993+
994+ 4 . Many ZenMux models are preloaded by default, run the ` /models ` command to select the one you want.
995+
996+ You can also add additional models through your opencode config.
997+
998+ ``` json title="opencode.json" {6}
999+ {
1000+ "$schema" : " https://opencode.ai/config.json" ,
1001+ "provider" : {
1002+ "zenmux" : {
1003+ "models" : {
1004+ "somecoolnewmodel" : {}
1005+ }
1006+ }
1007+ }
1008+ }
1009+ ```
1010+ ---
1011+
9601012## Custom provider
9611013
9621014To add any ** OpenAI-compatible** provider that's not listed in ` opencode auth login ` :
You can’t perform that action at this time.
0 commit comments