claude-codex-proxy 1.0.5-beta.44 → 1.0.5-beta.45
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/format-converter.js +13 -0
package/package.json
CHANGED
package/src/format-converter.js
CHANGED
|
@@ -184,6 +184,19 @@ export function convertAnthropicToResponsesAPI(anthropicRequest) {
|
|
|
184
184
|
request.instructions = '';
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
+
// Preserve the output constraint independently of reasoning effort and transport.
|
|
188
|
+
const format = anthropicRequest.output_config?.format;
|
|
189
|
+
if (format?.type === 'json_schema') {
|
|
190
|
+
request.text = {
|
|
191
|
+
format: {
|
|
192
|
+
type: 'json_schema',
|
|
193
|
+
name: 'claude_output_schema',
|
|
194
|
+
strict: true,
|
|
195
|
+
schema: format.schema
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
|
|
187
200
|
const effort = anthropicRequest.output_config?.effort;
|
|
188
201
|
if (SUPPORTED_REASONING_EFFORTS.has(effort)) {
|
|
189
202
|
request.reasoning = { effort };
|