@kenkaiiii/gg-core 6.1.0 → 6.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -797,7 +797,7 @@ interface ApiKeyVariant {
797
797
  label: string;
798
798
  /** `plan` bills the user's subscription; `payg` bills per token. */
799
799
  kind: "plan" | "payg";
800
- /** What the user spends with this key, e.g. "Uses your Kimi Code plan." */
800
+ /** What the user spends with this key, e.g. "Your Kimi Code plan." */
801
801
  billing: string;
802
802
  /** Base URL stored alongside this variant's credential. */
803
803
  baseUrl?: string;
package/dist/index.d.ts CHANGED
@@ -797,7 +797,7 @@ interface ApiKeyVariant {
797
797
  label: string;
798
798
  /** `plan` bills the user's subscription; `payg` bills per token. */
799
799
  kind: "plan" | "payg";
800
- /** What the user spends with this key, e.g. "Uses your Kimi Code plan." */
800
+ /** What the user spends with this key, e.g. "Your Kimi Code plan." */
801
801
  billing: string;
802
802
  /** Base URL stored alongside this variant's credential. */
803
803
  baseUrl?: string;
package/dist/index.js CHANGED
@@ -804,15 +804,15 @@ var ALL_AUTH_PROVIDERS = [
804
804
  oauth: {
805
805
  method: "oauth",
806
806
  label: "Sign in with Claude",
807
- billing: "Uses your Claude Pro or Max plan.",
808
- when: "Runs through Anthropic's Claude Code, which GG Coder downloads once (about 140 MB) the first time you pick this.",
807
+ billing: "Your Claude Pro or Max plan.",
808
+ when: "Downloads Claude Code once (about 140 MB).",
809
809
  requires: "A Claude Pro or Max subscription."
810
810
  },
811
811
  apikey: {
812
812
  method: "apikey",
813
813
  label: "Anthropic API key",
814
- billing: "Pay-per-token from an Anthropic Console key.",
815
- when: "No subscription needed. Used only while you are not signed in with Claude."
814
+ billing: "Pay per token.",
815
+ when: "Used when you're not signed in."
816
816
  }
817
817
  }
818
818
  },
@@ -826,15 +826,15 @@ var ALL_AUTH_PROVIDERS = [
826
826
  oauth: {
827
827
  method: "oauth",
828
828
  label: "Continue with ChatGPT",
829
- billing: "Uses your ChatGPT plan.",
830
- when: "Signs in through OpenAI. Manage what GG Coder may use at chatgpt.com/settings/usage.",
829
+ billing: "Your ChatGPT plan.",
830
+ when: "Set limits at chatgpt.com/settings/usage.",
831
831
  requires: "A ChatGPT plan."
832
832
  },
833
833
  apikey: {
834
834
  method: "apikey",
835
835
  label: "OpenAI API key",
836
- billing: "Pay-per-token from an OpenAI Platform key.",
837
- when: "No subscription needed. Covers you while your ChatGPT plan's usage is out."
836
+ billing: "Pay per token.",
837
+ when: "Covers you when plan usage runs out."
838
838
  }
839
839
  }
840
840
  },
@@ -851,11 +851,11 @@ var ALL_AUTH_PROVIDERS = [
851
851
  key: GEMINI_API_KEY,
852
852
  label: "Google AI Studio",
853
853
  kind: "payg",
854
- billing: "Pay-per-token from a Google AI Studio key.",
854
+ billing: "Pay per token, from Google AI Studio.",
855
855
  baseUrl: GEMINI_API_KEY_BASE_URL
856
856
  }
857
857
  ],
858
- methodDetails: apiKeyDetails("Gemini API key", "Pay-per-token from a Google AI Studio key.")
858
+ methodDetails: apiKeyDetails("Gemini API key", "Pay per token, from Google AI Studio.")
859
859
  },
860
860
  {
861
861
  value: "xai",
@@ -863,11 +863,7 @@ var ALL_AUTH_PROVIDERS = [
863
863
  description: "Grok 4.7",
864
864
  methods: ["apikey"],
865
865
  apiKeyLabel: "xAI",
866
- methodDetails: apiKeyDetails(
867
- "xAI API key",
868
- "Pay-per-token from console.x.ai credits.",
869
- "SuperGrok and X Premium usage is only offered in apps xAI partners with."
870
- )
866
+ methodDetails: apiKeyDetails("xAI API key", "Pay per token, from console.x.ai.", "")
871
867
  },
872
868
  {
873
869
  value: "moonshot",
@@ -880,18 +876,18 @@ var ALL_AUTH_PROVIDERS = [
880
876
  key: KIMI_CODE_KEY,
881
877
  label: "Kimi Code plan",
882
878
  kind: "plan",
883
- billing: "Uses your Kimi Code plan. Create the key in the Kimi Code Console."
879
+ billing: "Your Kimi Code plan. Get the key in its console."
884
880
  },
885
881
  {
886
882
  key: "moonshot",
887
883
  label: "Moonshot API",
888
884
  kind: "payg",
889
- billing: "Pay-per-token from platform.moonshot.ai."
885
+ billing: "Pay per token, from platform.moonshot.ai."
890
886
  }
891
887
  ],
892
888
  methodDetails: apiKeyDetails(
893
889
  "Kimi API key",
894
- "A Kimi Code plan key uses your plan; a Moonshot key is pay-per-token."
890
+ "A Kimi Code plan key, or a pay-per-token Moonshot key."
895
891
  )
896
892
  },
897
893
  {
@@ -905,19 +901,19 @@ var ALL_AUTH_PROVIDERS = [
905
901
  key: GLM_CODING_PLAN_KEY,
906
902
  label: "GLM Coding Plan",
907
903
  kind: "plan",
908
- billing: "Uses your GLM Coding Plan.",
904
+ billing: "Your GLM Coding Plan.",
909
905
  baseUrl: GLM_CODING_PLAN_BASE_URL
910
906
  },
911
907
  {
912
908
  key: "glm",
913
909
  label: "Z.AI API",
914
910
  kind: "payg",
915
- billing: "Pay-per-token from your Z.AI account balance."
911
+ billing: "Pay per token, from your Z.AI balance."
916
912
  }
917
913
  ],
918
914
  methodDetails: apiKeyDetails(
919
915
  "Z.AI API key",
920
- "A GLM Coding Plan key uses your plan; a Z.AI API key is pay-per-token."
916
+ "A GLM Coding Plan key, or a pay-per-token Z.AI key."
921
917
  )
922
918
  },
923
919
  {
@@ -926,11 +922,7 @@ var ALL_AUTH_PROVIDERS = [
926
922
  description: "MiniMax M3.1 Flash, M3",
927
923
  methods: ["apikey"],
928
924
  apiKeyLabel: "MiniMax",
929
- methodDetails: apiKeyDetails(
930
- "MiniMax API key",
931
- "An M Plan key uses your plan; a pay-as-you-go key is pay-per-token.",
932
- "The key you paste decides which one is billed."
933
- )
925
+ methodDetails: apiKeyDetails("MiniMax API key", "An M Plan key, or a pay-per-token key.", "")
934
926
  },
935
927
  {
936
928
  value: "xiaomi",
@@ -944,20 +936,20 @@ var ALL_AUTH_PROVIDERS = [
944
936
  key: "xiaomi",
945
937
  label: "Token Plan",
946
938
  kind: "plan",
947
- billing: "Uses your MiMo Token Plan.",
939
+ billing: "Your MiMo Token Plan.",
948
940
  baseUrl: "https://token-plan-sgp.xiaomimimo.com/v1"
949
941
  },
950
942
  {
951
943
  key: XIAOMI_CREDITS_KEY,
952
944
  label: "API Credits",
953
945
  kind: "payg",
954
- billing: "Pay-per-token from MiMo API Credits.",
946
+ billing: "Pay per token, from MiMo API Credits.",
955
947
  baseUrl: "https://api.xiaomimimo.com/v1"
956
948
  }
957
949
  ],
958
950
  methodDetails: apiKeyDetails(
959
951
  "Xiaomi MiMo API key",
960
- "A Token Plan key uses your plan; an API Credits key is pay-per-token."
952
+ "A Token Plan key, or a pay-per-token API Credits key."
961
953
  )
962
954
  },
963
955
  {
@@ -966,7 +958,7 @@ var ALL_AUTH_PROVIDERS = [
966
958
  description: "DeepSeek V4 Pro, V4.1 Flash",
967
959
  methods: ["apikey"],
968
960
  apiKeyLabel: "DeepSeek",
969
- methodDetails: apiKeyDetails("DeepSeek API key", "Pay-per-token from platform.deepseek.com.")
961
+ methodDetails: apiKeyDetails("DeepSeek API key", "Pay per token, from platform.deepseek.com.")
970
962
  },
971
963
  {
972
964
  value: "sakana",
@@ -974,7 +966,7 @@ var ALL_AUTH_PROVIDERS = [
974
966
  description: "Fugu, Fugu Max, Fugu Ultra",
975
967
  methods: ["apikey"],
976
968
  apiKeyLabel: "Sakana",
977
- methodDetails: apiKeyDetails("Sakana API key", "Pay-per-token from your Sakana API account.")
969
+ methodDetails: apiKeyDetails("Sakana API key", "Pay per token, from your Sakana account.")
978
970
  },
979
971
  {
980
972
  value: "opencode-go",
@@ -984,8 +976,8 @@ var ALL_AUTH_PROVIDERS = [
984
976
  apiKeyLabel: "OpenCode",
985
977
  methodDetails: apiKeyDetails(
986
978
  "OpenCode API key",
987
- "Uses your OpenCode Go subscription.",
988
- "Create a personal API key in the OpenCode Console, in a workspace subscribed to Go."
979
+ "Your OpenCode Go subscription.",
980
+ "Use a key from a Go workspace."
989
981
  )
990
982
  },
991
983
  {
@@ -996,8 +988,8 @@ var ALL_AUTH_PROVIDERS = [
996
988
  apiKeyLabel: "OpenCode",
997
989
  methodDetails: apiKeyDetails(
998
990
  "OpenCode API key",
999
- "Pay-per-token from your OpenCode Console credits.",
1000
- "Free-tier models only run inside OpenCode, so they are not listed here."
991
+ "Pay per token, from OpenCode credits.",
992
+ "Free models only run inside OpenCode."
1001
993
  )
1002
994
  },
1003
995
  {
@@ -1006,7 +998,7 @@ var ALL_AUTH_PROVIDERS = [
1006
998
  description: "Qwen3.8 Max \xB7 multi-provider gateway",
1007
999
  methods: ["apikey"],
1008
1000
  apiKeyLabel: "OpenRouter",
1009
- methodDetails: apiKeyDetails("OpenRouter API key", "Pay-per-token from OpenRouter credits.")
1001
+ methodDetails: apiKeyDetails("OpenRouter API key", "Pay per token, from OpenRouter credits.")
1010
1002
  },
1011
1003
  {
1012
1004
  value: "huggingface",
@@ -1014,10 +1006,7 @@ var ALL_AUTH_PROVIDERS = [
1014
1006
  description: "Kimi K2.7 Code, DeepSeek V4.1 Flash, GPT-OSS 120B",
1015
1007
  methods: ["apikey"],
1016
1008
  apiKeyLabel: "Hugging Face",
1017
- methodDetails: apiKeyDetails(
1018
- "Hugging Face token",
1019
- "Pay-per-token from Hugging Face Inference Providers credits."
1020
- )
1009
+ methodDetails: apiKeyDetails("Hugging Face token", "Pay per token, from Hugging Face credits.")
1021
1010
  }
1022
1011
  ];
1023
1012
  function requiredKeyLabel(provider, storageKeys) {
@@ -1042,29 +1031,29 @@ function describeAuthMethods(provider) {
1042
1031
  return method === "oauth" ? {
1043
1032
  method,
1044
1033
  label: `Sign in with ${meta.label}`,
1045
- billing: "Uses your existing plan with this provider.",
1034
+ billing: "Your plan with this provider.",
1046
1035
  when: ""
1047
1036
  } : {
1048
1037
  method,
1049
1038
  label: `${meta.apiKeyLabel ?? meta.label} API key`,
1050
- billing: "Pay-per-token on this provider's API credits.",
1039
+ billing: "Pay per token.",
1051
1040
  when: ""
1052
1041
  };
1053
1042
  });
1054
1043
  }
1055
1044
  function authPriorityNote(provider) {
1056
1045
  if (provider === "anthropic") {
1057
- return "Uses Sign in with Claude while you are signed in; otherwise the Anthropic API key.";
1046
+ return "Sign in with Claude comes first; the API key covers you when signed out.";
1058
1047
  }
1059
1048
  const dual = dualAuthProvider(provider);
1060
1049
  if (dual) {
1061
- return `Uses your ${dual.oauthLabel} first; the ${dual.apiKeyLabel} takes over while its usage is out, then switches back.`;
1050
+ return `Uses your ${dual.oauthLabel} first, then the ${dual.apiKeyLabel} when its usage runs out.`;
1062
1051
  }
1063
1052
  const variants = getAuthProvider(provider)?.apiKeyVariants;
1064
1053
  const plan = variants?.find((v) => v.kind === "plan");
1065
1054
  const payg = variants?.find((v) => v.kind === "payg");
1066
1055
  if (plan && payg) {
1067
- return `Uses the ${plan.label} key first when both are set; the ${payg.label} key covers models the plan doesn't include.`;
1056
+ return `Uses the ${plan.label} key first; the ${payg.label} key covers other models.`;
1068
1057
  }
1069
1058
  return void 0;
1070
1059
  }