@ai-sdk/harness-codex 1.0.157 → 1.0.159

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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @ai-sdk/harness-codex
2
2
 
3
+ ## 1.0.159
4
+
5
+ ### Patch Changes
6
+
7
+ - 184b9d3: feat(harness-codex): add support for image input
8
+ - Updated dependencies [0c2a9de]
9
+ - Updated dependencies [200c47f]
10
+ - Updated dependencies [ca2a9f7]
11
+ - @ai-sdk/provider@4.0.31
12
+ - @ai-sdk/provider-utils@5.0.64
13
+ - @ai-sdk/harness@1.0.157
14
+
15
+ ## 1.0.158
16
+
17
+ ### Patch Changes
18
+
19
+ - @ai-sdk/harness@1.0.156
20
+
3
21
  ## 1.0.157
4
22
 
5
23
  ### Patch Changes
@@ -1625,11 +1625,18 @@ function createTurnParams({ threadId, start, codexModel, disableEnvironments = f
1625
1625
  return {
1626
1626
  threadId,
1627
1627
  ...disableEnvironments ? { environments: [] } : {},
1628
- input: [{
1628
+ input: typeof start.prompt === "string" ? [{
1629
1629
  type: "text",
1630
1630
  text: start.prompt,
1631
1631
  text_elements: []
1632
- }],
1632
+ }] : start.prompt.map((part) => part.type === "text" ? {
1633
+ type: "text",
1634
+ text: part.text,
1635
+ text_elements: []
1636
+ } : {
1637
+ type: "image",
1638
+ url: `data:${part.mediaType};base64,${part.data}`
1639
+ }),
1633
1640
  approvalPolicy: "never",
1634
1641
  sandboxPolicy: {
1635
1642
  type: "externalSandbox",