@codeproxy/core 0.1.4 → 0.1.5

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/README.md CHANGED
@@ -23,7 +23,7 @@ const client = new OpenAI({
23
23
  });
24
24
 
25
25
  const response = await client.responses.create({
26
- model: 'deepseek-v4-pro',
26
+ model: 'deepseek-v4-flash',
27
27
  input: 'Hello!',
28
28
  });
29
29
  ```
package/README.zh-CN.md CHANGED
@@ -23,7 +23,7 @@ const client = new OpenAI({
23
23
  });
24
24
 
25
25
  const response = await client.responses.create({
26
- model: 'deepseek-v4-pro',
26
+ model: 'deepseek-v4-flash',
27
27
  input: 'Hello!',
28
28
  });
29
29
  ```
package/dist/index.cjs CHANGED
@@ -1961,6 +1961,12 @@ function buildUpstreamBody(request, format, streaming, baseUrl, dropImages, reas
1961
1961
  ar.thinking = { type: "enabled", budget_tokens: 65536 };
1962
1962
  }
1963
1963
  }
1964
+ if (ar.thinking && typeof ar.thinking === "object" && "budget_tokens" in ar.thinking) {
1965
+ const budget = Number(ar.thinking.budget_tokens);
1966
+ if (budget > 0 && ar.max_tokens <= budget) {
1967
+ ar.max_tokens = budget + 1024;
1968
+ }
1969
+ }
1964
1970
  return {
1965
1971
  upstreamBody: ar,
1966
1972
  requestMetadata: buildRequestMetadata(request, ar.temperature, ar.top_p)