opencode-aicodewith-auth 0.1.69 → 0.1.71

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.
Files changed (2) hide show
  1. package/dist/index.js +23 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2036,8 +2036,31 @@ var ensurePluginEntry = (list) => {
2036
2036
  }
2037
2037
  return changed ? normalized : list;
2038
2038
  };
2039
+ var normalizeModelProviders = (models) => {
2040
+ if (!models || typeof models !== "object")
2041
+ return models;
2042
+ const normalized = {};
2043
+ for (const [id, val] of Object.entries(models)) {
2044
+ if (!val || typeof val !== "object") {
2045
+ normalized[id] = val;
2046
+ continue;
2047
+ }
2048
+ const m = { ...val };
2049
+ const p = m.provider;
2050
+ if (p && typeof p === "object") {
2051
+ const np = { ...p };
2052
+ if (typeof np.npm === "string" && typeof np.api !== "string") {
2053
+ np.api = "https://api.openai.com/v1";
2054
+ }
2055
+ m.provider = np;
2056
+ }
2057
+ normalized[id] = m;
2058
+ }
2059
+ return normalized;
2060
+ };
2039
2061
  var buildStandardProviderConfig = () => ({
2040
2062
  ...provider_config_default,
2063
+ models: normalizeModelProviders(provider_config_default.models),
2041
2064
  npm: PROVIDER_NPM
2042
2065
  });
2043
2066
  var applyProviderConfig = (config) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-aicodewith-auth",
3
- "version": "0.1.69",
3
+ "version": "0.1.71",
4
4
  "description": "OpenCode plugin for AICodewith authentication - Access GPT-5.3 Codex, GPT-5.2, Claude, and Gemini models through AICodewith API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",