This feature request concerns Puter.js' AI chat completion API. (Sorry, I know you're tired of hearing these.)
I think Puter.js is great, and I'm looking to integrate it directly into my website. The only issue is that, despite being feature-rich, the high-level API doesn't seem to expose the raw OpenRouter configuration, or any provider's, for that matter. This means I can't utilize important schema options for things like structured generation or provider-level routing.
I am trying to use puter.ai.chat with standard options like response_format (for JSON) or provider (for routing), but they seem to be ignored by the current API implementation. No provider routing also means no ZDR, which is an important acknowledgement for my user base.
And, oh yeah, it'd be really nice if I could enable reasoning for Claude, or control CoT budget for Gemini.
I would like to request that these additional arguments in the options object be exposed for the standard chat call.
Here is the code I would like to be able to run:
<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<script>
puter.ai.chat(`Generate some data based on the file.`, {
model: "meta-llama/llama-3.1-70b-instruct",
// New arguments that would make the experience much better
response_format: { type: "json_object" },
// + stuff for thinking, like thinkingLevel or Budget, depending on the model
provider: {
order: ["deepinfra", "together"], // Or whatever providers are supported
allow_fallbacks: false
}
}).then(puter.print);
</script>
</body>
</html>
Thank you so much.
This feature request concerns Puter.js' AI chat completion API. (Sorry, I know you're tired of hearing these.)
I think Puter.js is great, and I'm looking to integrate it directly into my website. The only issue is that, despite being feature-rich, the high-level API doesn't seem to expose the raw OpenRouter configuration, or any provider's, for that matter. This means I can't utilize important schema options for things like structured generation or provider-level routing.
I am trying to use
puter.ai.chatwith standard options likeresponse_format(for JSON) orprovider(for routing), but they seem to be ignored by the current API implementation. No provider routing also means no ZDR, which is an important acknowledgement for my user base.And, oh yeah, it'd be really nice if I could enable reasoning for Claude, or control CoT budget for Gemini.
I would like to request that these additional arguments in the
optionsobject be exposed for the standard chat call.Here is the code I would like to be able to run:
Thank you so much.