mirror of
https://codeberg.org/muon/home.git
synced 2026-07-03 23:49:35 +00:00
Add auth2api to opencode
This commit is contained in:
parent
637619cb38
commit
58371e08ec
1 changed files with 14 additions and 1 deletions
|
|
@ -2,8 +2,11 @@
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
osConfig,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
a2a = osConfig.mods.server.auth2api;
|
||||||
|
in {
|
||||||
options.mods.opencode.enable = lib.mkEnableOption "enables opencode";
|
options.mods.opencode.enable = lib.mkEnableOption "enables opencode";
|
||||||
|
|
||||||
# imports = [
|
# imports = [
|
||||||
|
|
@ -21,6 +24,16 @@
|
||||||
settings = {
|
settings = {
|
||||||
"plugin" = ["opencode-gemini-auth" "opencode-anthropic-oauth"];
|
"plugin" = ["opencode-gemini-auth" "opencode-anthropic-oauth"];
|
||||||
|
|
||||||
|
"provider" = {
|
||||||
|
"auth2api" = {
|
||||||
|
"npm" = "@ai-sdk/openai-compatible";
|
||||||
|
"name" = "auth2api (local)";
|
||||||
|
"options" = {
|
||||||
|
"baseURL" = "http://${a2a.host}:${toString a2a.port}/v1";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
"mode" = {
|
"mode" = {
|
||||||
"build" = {
|
"build" = {
|
||||||
"prompt" = "You are Claude Code, Anthropic's official CLI for Claude.";
|
"prompt" = "You are Claude Code, Anthropic's official CLI for Claude.";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue