opencode-aicodewith-auth 0.1.60 → 0.1.62

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 +9 -13
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -239,7 +239,7 @@ var AICODEWITH_GEMINI_BASE_URL = "https://api.aicodewith.com/gemini_cli";
239
239
  var GEMINI_USER_AGENT = "GeminiCLI/v25.2.1 (darwin; arm64)";
240
240
  var GEMINI_API_CLIENT = "google-genai-sdk/1.30.0 gl-node/v25.2.1";
241
241
  var GEMINI_PRIVILEGED_USER_ID_ENV = "AICODEWITH_GEMINI_USER_ID";
242
- var USER_AGENT = "codex_cli_rs/0.77.0 (Mac OS 26.2.0; arm64) iTerm.app/3.6.6";
242
+ var USER_AGENT = "codex_cli_rs/0.93.0 (Mac OS 26.2.0; arm64) iTerm.app/3.6.6";
243
243
  var ORIGINATOR = "codex_cli_rs";
244
244
  var SAVE_RAW_RESPONSE_ENV = "SAVE_RAW_RESPONSE";
245
245
  var MODEL_MIGRATIONS = buildModelMigrations();
@@ -695,7 +695,7 @@ function resolveReasoningConfig(modelName, body) {
695
695
  }
696
696
  function resolveTextVerbosity(body) {
697
697
  const providerOpenAI = body.providerOptions?.openai;
698
- return body.text?.verbosity ?? providerOpenAI?.textVerbosity;
698
+ return body.text?.verbosity ?? providerOpenAI?.textVerbosity ?? "medium";
699
699
  }
700
700
  function resolveInclude(body) {
701
701
  const providerOpenAI = body.providerOptions?.openai;
@@ -773,9 +773,9 @@ async function transformRequestBody(body, codexInstructions) {
773
773
  body.model = normalizedModel;
774
774
  body.stream = true;
775
775
  body.store = false;
776
- delete body.previousResponseId;
777
- delete body.previous_response_id;
778
- body.instructions = codexInstructions;
776
+ if (!body.instructions) {
777
+ body.instructions = codexInstructions;
778
+ }
779
779
  if (body.input && Array.isArray(body.input)) {
780
780
  body.input = sanitizeItemIds(body.input);
781
781
  body.input = filterOpenCodeSystemPrompts(body.input);
@@ -790,12 +790,10 @@ async function transformRequestBody(body, codexInstructions) {
790
790
  ...reasoningConfig
791
791
  };
792
792
  const verbosity = resolveTextVerbosity(body);
793
- if (verbosity) {
794
- body.text = {
795
- ...body.text,
796
- verbosity
797
- };
798
- }
793
+ body.text = {
794
+ ...body.text,
795
+ verbosity
796
+ };
799
797
  body.include = resolveInclude(body);
800
798
  body.max_output_tokens = undefined;
801
799
  body.max_completion_tokens = undefined;
@@ -877,8 +875,6 @@ function extractRequestUrl(input) {
877
875
  function sanitizeRequestBody(bodyStr) {
878
876
  try {
879
877
  const body = JSON.parse(bodyStr);
880
- delete body.previousResponseId;
881
- delete body.previous_response_id;
882
878
  body.store = false;
883
879
  if (Array.isArray(body.input)) {
884
880
  body.input = sanitizeItemIds(body.input);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-aicodewith-auth",
3
- "version": "0.1.60",
3
+ "version": "0.1.62",
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",