yymaxapi 1.0.33 → 1.0.34

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/bin/yymaxapi.js +11 -5
  2. package/package.json +1 -1
package/bin/yymaxapi.js CHANGED
@@ -640,6 +640,10 @@ function writeCodexConfig(baseUrl, apiKey) {
640
640
  const configPath = path.join(codexDir, 'config.toml');
641
641
  const marker = '# >>> maxapi codex >>>';
642
642
  const markerEnd = '# <<< maxapi codex <<<';
643
+ const providerKey = 'openclaw-relay';
644
+ // 确保 base_url 以 /v1 结尾(Codex CLI 要求)
645
+ let normalizedUrl = baseUrl.replace(/\/+$/, '');
646
+ if (!normalizedUrl.endsWith('/v1')) normalizedUrl += '/v1';
643
647
  try {
644
648
  let existing = '';
645
649
  if (fs.existsSync(configPath)) {
@@ -650,12 +654,14 @@ function writeCodexConfig(baseUrl, apiKey) {
650
654
  }
651
655
  const section = [
652
656
  marker,
653
- `model = "o4-mini"`,
654
- `provider = "openai"`,
657
+ `model = "gpt-5.3-codex"`,
658
+ `model_provider = "${providerKey}"`,
655
659
  ``,
656
- `[providers.openai]`,
657
- `api_key = "${apiKey}"`,
658
- `base_url = "${baseUrl.replace(/\/+$/, '')}"`,
660
+ `[model_providers.${providerKey}]`,
661
+ `name = "OpenClaw Relay"`,
662
+ `base_url = "${normalizedUrl}"`,
663
+ `wire_api = "responses"`,
664
+ `env_key = "OPENAI_API_KEY"`,
659
665
  markerEnd
660
666
  ].join('\n');
661
667
  const content = existing ? `${existing}\n\n${section}\n` : `${section}\n`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yymaxapi",
3
- "version": "1.0.33",
3
+ "version": "1.0.34",
4
4
  "description": "跨平台 OpenClaw/Clawdbot 配置管理工具 - 管理中转地址、模型切换、API Keys、测速优化",
5
5
  "main": "bin/yymaxapi.js",
6
6
  "bin": {