claude-codex-proxy 1.0.5-beta.40 → 1.0.5-beta.42
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/package.json +1 -1
- package/src/model-mapper.js +3 -4
- package/src/model-pricing.js +12 -0
- package/src/routes/models-route.js +1 -0
- package/src/server-settings.js +1 -1
package/package.json
CHANGED
package/src/model-mapper.js
CHANGED
|
@@ -3,14 +3,13 @@
|
|
|
3
3
|
* Maps Anthropic/Claude model names to upstream OpenAI model identifiers.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { getServerSettings } from './server-settings.js';
|
|
7
|
-
|
|
8
|
-
const DEFAULT_CODEX_MODEL = 'gpt-5.5';
|
|
6
|
+
import { DEFAULT_SETTINGS, getServerSettings } from './server-settings.js';
|
|
9
7
|
|
|
10
8
|
const DIRECT_GPT_MODEL_RE = /^gpt-[a-z0-9][a-z0-9._-]*(?::[a-z0-9._-]+)?$/i;
|
|
11
9
|
|
|
12
10
|
function getDefaultCodexModel(settings = getServerSettings()) {
|
|
13
|
-
|
|
11
|
+
// Keep the routing fallback aligned with the centralized built-in default.
|
|
12
|
+
return settings.defaultCodexModel || DEFAULT_SETTINGS.defaultCodexModel;
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
function lookupModelMap(model, modelMap) {
|
package/src/model-pricing.js
CHANGED
|
@@ -9,6 +9,12 @@ export const LONG_CONTEXT_THRESHOLD_TOKENS = 272_000;
|
|
|
9
9
|
export const DEFAULT_PRICING_MODEL = 'gpt-5.6-sol';
|
|
10
10
|
|
|
11
11
|
const STANDARD_PRICING = {
|
|
12
|
+
'gpt-6.1-terra': {
|
|
13
|
+
input: 1,
|
|
14
|
+
cachedInput: 0.05,
|
|
15
|
+
cacheWrite: 1.25,
|
|
16
|
+
output: 5
|
|
17
|
+
},
|
|
12
18
|
'gpt-6.1-sol': {
|
|
13
19
|
input: 2,
|
|
14
20
|
cachedInput: 0.1,
|
|
@@ -60,6 +66,12 @@ const STANDARD_PRICING = {
|
|
|
60
66
|
};
|
|
61
67
|
|
|
62
68
|
const LONG_CONTEXT_PRICING = {
|
|
69
|
+
'gpt-6.1-terra': {
|
|
70
|
+
input: 2,
|
|
71
|
+
cachedInput: 0.1,
|
|
72
|
+
cacheWrite: 2.5,
|
|
73
|
+
output: 7.5
|
|
74
|
+
},
|
|
63
75
|
'gpt-6.1-sol': {
|
|
64
76
|
input: 4,
|
|
65
77
|
cachedInput: 0.2,
|
|
@@ -13,6 +13,7 @@ import { getCredentialsOrError } from '../middleware/credentials.js';
|
|
|
13
13
|
|
|
14
14
|
export const FALLBACK_MODELS = [
|
|
15
15
|
// OpenAI upstream models
|
|
16
|
+
{ id: 'gpt-6.1-terra', object: 'model', owned_by: 'openai' },
|
|
16
17
|
{ id: 'gpt-6.1-sol', object: 'model', owned_by: 'openai' },
|
|
17
18
|
{ id: 'gpt-6-astra', object: 'model', owned_by: 'openai' },
|
|
18
19
|
{ id: 'gpt-6-sol', object: 'model', owned_by: 'openai' },
|
package/src/server-settings.js
CHANGED
|
@@ -15,7 +15,7 @@ export const DEFAULT_CLIENT_KEY_FIVE_HOUR_LIMIT_USD = 0;
|
|
|
15
15
|
|
|
16
16
|
export const DEFAULT_SETTINGS = {
|
|
17
17
|
accountStrategy: 'sticky',
|
|
18
|
-
defaultCodexModel: 'gpt-
|
|
18
|
+
defaultCodexModel: 'gpt-6.1-sol',
|
|
19
19
|
logRawProxyPayloads: false,
|
|
20
20
|
modelMap: DEFAULT_MODEL_MAP,
|
|
21
21
|
clientApiKeys: []
|