Skip to content

Commit

Permalink
[wrangler] Support ai bindings in getBindingsProxy (#4869)
Browse files Browse the repository at this point in the history
* Retain AI service binding from miniflare options

* Update changeset
  • Loading branch information
jculvey authored Jan 30, 2024
1 parent ed40cf8 commit fd084bc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .changeset/odd-kids-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"wrangler": patch
---

feature: Expose AI bindings to `getBindingsProxy`.

The `getBindingsProxy` utility function will now contain entries for any AI bindings specified in `wrangler.toml`.
5 changes: 4 additions & 1 deletion packages/wrangler/src/api/integrations/bindings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ async function getMiniflareOptionsFromConfig(
script: "",
modules: true,
...bindingOptions,
serviceBindings,
serviceBindings: {
...serviceBindings,
...bindingOptions.serviceBindings,
},
},
externalDurableObjectWorker,
],
Expand Down

0 comments on commit fd084bc

Please sign in to comment.