opencode-aicodewith-auth 0.1.64 → 0.1.67
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.js +108 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -177,6 +177,16 @@ var buildModelMigrations = () => {
|
|
|
177
177
|
}
|
|
178
178
|
return migrations;
|
|
179
179
|
};
|
|
180
|
+
var CODEX_VARIANTS = {
|
|
181
|
+
low: { reasoningEffort: "low", reasoningSummary: "auto", textVerbosity: "medium" },
|
|
182
|
+
medium: { reasoningEffort: "medium", reasoningSummary: "auto", textVerbosity: "medium" },
|
|
183
|
+
high: { reasoningEffort: "high", reasoningSummary: "detailed", textVerbosity: "medium" },
|
|
184
|
+
xhigh: { reasoningEffort: "xhigh", reasoningSummary: "detailed", textVerbosity: "medium" }
|
|
185
|
+
};
|
|
186
|
+
var GPT_VARIANTS = {
|
|
187
|
+
none: { reasoningEffort: "none", reasoningSummary: "auto", textVerbosity: "medium" },
|
|
188
|
+
...CODEX_VARIANTS
|
|
189
|
+
};
|
|
180
190
|
var buildAliasMap = () => {
|
|
181
191
|
const map = {};
|
|
182
192
|
for (const model of getActiveModels()) {
|
|
@@ -1781,6 +1791,40 @@ var provider_config_default = {
|
|
|
1781
1791
|
output: [
|
|
1782
1792
|
"text"
|
|
1783
1793
|
]
|
|
1794
|
+
},
|
|
1795
|
+
provider: {
|
|
1796
|
+
npm: "@ai-sdk/openai"
|
|
1797
|
+
},
|
|
1798
|
+
options: {
|
|
1799
|
+
store: false,
|
|
1800
|
+
reasoningEffort: "medium",
|
|
1801
|
+
reasoningSummary: "auto",
|
|
1802
|
+
textVerbosity: "medium",
|
|
1803
|
+
include: [
|
|
1804
|
+
"reasoning.encrypted_content"
|
|
1805
|
+
]
|
|
1806
|
+
},
|
|
1807
|
+
variants: {
|
|
1808
|
+
low: {
|
|
1809
|
+
reasoningEffort: "low",
|
|
1810
|
+
reasoningSummary: "auto",
|
|
1811
|
+
textVerbosity: "medium"
|
|
1812
|
+
},
|
|
1813
|
+
medium: {
|
|
1814
|
+
reasoningEffort: "medium",
|
|
1815
|
+
reasoningSummary: "auto",
|
|
1816
|
+
textVerbosity: "medium"
|
|
1817
|
+
},
|
|
1818
|
+
high: {
|
|
1819
|
+
reasoningEffort: "high",
|
|
1820
|
+
reasoningSummary: "detailed",
|
|
1821
|
+
textVerbosity: "medium"
|
|
1822
|
+
},
|
|
1823
|
+
xhigh: {
|
|
1824
|
+
reasoningEffort: "xhigh",
|
|
1825
|
+
reasoningSummary: "detailed",
|
|
1826
|
+
textVerbosity: "medium"
|
|
1827
|
+
}
|
|
1784
1828
|
}
|
|
1785
1829
|
},
|
|
1786
1830
|
"gpt-5.2": {
|
|
@@ -1797,6 +1841,45 @@ var provider_config_default = {
|
|
|
1797
1841
|
output: [
|
|
1798
1842
|
"text"
|
|
1799
1843
|
]
|
|
1844
|
+
},
|
|
1845
|
+
provider: {
|
|
1846
|
+
npm: "@ai-sdk/openai"
|
|
1847
|
+
},
|
|
1848
|
+
options: {
|
|
1849
|
+
store: false,
|
|
1850
|
+
reasoningEffort: "medium",
|
|
1851
|
+
reasoningSummary: "auto",
|
|
1852
|
+
textVerbosity: "medium",
|
|
1853
|
+
include: [
|
|
1854
|
+
"reasoning.encrypted_content"
|
|
1855
|
+
]
|
|
1856
|
+
},
|
|
1857
|
+
variants: {
|
|
1858
|
+
none: {
|
|
1859
|
+
reasoningEffort: "none",
|
|
1860
|
+
reasoningSummary: "auto",
|
|
1861
|
+
textVerbosity: "medium"
|
|
1862
|
+
},
|
|
1863
|
+
low: {
|
|
1864
|
+
reasoningEffort: "low",
|
|
1865
|
+
reasoningSummary: "auto",
|
|
1866
|
+
textVerbosity: "medium"
|
|
1867
|
+
},
|
|
1868
|
+
medium: {
|
|
1869
|
+
reasoningEffort: "medium",
|
|
1870
|
+
reasoningSummary: "auto",
|
|
1871
|
+
textVerbosity: "medium"
|
|
1872
|
+
},
|
|
1873
|
+
high: {
|
|
1874
|
+
reasoningEffort: "high",
|
|
1875
|
+
reasoningSummary: "detailed",
|
|
1876
|
+
textVerbosity: "medium"
|
|
1877
|
+
},
|
|
1878
|
+
xhigh: {
|
|
1879
|
+
reasoningEffort: "xhigh",
|
|
1880
|
+
reasoningSummary: "detailed",
|
|
1881
|
+
textVerbosity: "medium"
|
|
1882
|
+
}
|
|
1800
1883
|
}
|
|
1801
1884
|
},
|
|
1802
1885
|
"claude-opus-4-6-20260205": {
|
|
@@ -1926,8 +2009,30 @@ var isPackageEntry = (value) => value === PACKAGE_NAME3 || value.startsWith(`${P
|
|
|
1926
2009
|
var ensurePluginEntry = (list) => {
|
|
1927
2010
|
if (!Array.isArray(list))
|
|
1928
2011
|
return [PLUGIN_ENTRY];
|
|
1929
|
-
|
|
1930
|
-
|
|
2012
|
+
let changed = false;
|
|
2013
|
+
let seenPlugin = false;
|
|
2014
|
+
const normalized = [];
|
|
2015
|
+
for (const entry of list) {
|
|
2016
|
+
let nextEntry = entry;
|
|
2017
|
+
if (typeof entry === "string" && isPackageEntry(entry)) {
|
|
2018
|
+
if (entry !== PLUGIN_ENTRY)
|
|
2019
|
+
changed = true;
|
|
2020
|
+
nextEntry = PLUGIN_ENTRY;
|
|
2021
|
+
}
|
|
2022
|
+
if (nextEntry === PLUGIN_ENTRY) {
|
|
2023
|
+
if (seenPlugin) {
|
|
2024
|
+
changed = true;
|
|
2025
|
+
continue;
|
|
2026
|
+
}
|
|
2027
|
+
seenPlugin = true;
|
|
2028
|
+
}
|
|
2029
|
+
normalized.push(nextEntry);
|
|
2030
|
+
}
|
|
2031
|
+
if (!seenPlugin) {
|
|
2032
|
+
changed = true;
|
|
2033
|
+
normalized.push(PLUGIN_ENTRY);
|
|
2034
|
+
}
|
|
2035
|
+
return changed ? normalized : list;
|
|
1931
2036
|
};
|
|
1932
2037
|
var buildStandardProviderConfig = () => ({
|
|
1933
2038
|
...provider_config_default,
|
|
@@ -2111,7 +2216,7 @@ var AicodewithCodexAuthPlugin = async (ctx) => {
|
|
|
2111
2216
|
if (isCodexRequest) {
|
|
2112
2217
|
const transformation = await transformRequestForCodex(init);
|
|
2113
2218
|
let requestInit = transformation?.updatedInit ?? init;
|
|
2114
|
-
if (!transformation && init
|
|
2219
|
+
if (!transformation && init?.body) {
|
|
2115
2220
|
const sanitized = sanitizeRequestBody(init.body);
|
|
2116
2221
|
requestInit = { ...init, body: sanitized };
|
|
2117
2222
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-aicodewith-auth",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.67",
|
|
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",
|