Skip to content

Conversation

@sicoyle
Copy link
Contributor

@sicoyle sicoyle commented Dec 20, 2025

Description

This PR adds:

  • timeout support for llm providers on the http client and to prevent idle connections from being closed
  • response format field - this is something that users rely on. In dapr agents we do a workaround for this that I want to rm with this addition
  • i also had to bump langchain versions for some of the new options to be supported (even with the workarounds)
  • conversation api model override parameter bubbled over and returned in the response

API PR: dapr/dapr#9241

I need this PR merged first to then merge my dapr/dapr one.

I tested conformance test on: mistral, openai, anthropic.
I have a few fixes left for ollama, and aws (this one was broken to begin with...).

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #[issue number]

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation
    • Created the dapr/docs PR:

Note: We expect contributors to open a corresponding documentation PR in the dapr/docs repository. As the implementer, you are the best person to document your work! Implementation PRs will not be merged until the documentation PR is opened and ready for review.

…che works) for convo api

Signed-off-by: Samantha Coyle <[email protected]>
@sicoyle sicoyle requested review from a team as code owners December 20, 2025 00:02
Copy link
Contributor

@CasperGN CasperGN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sicoyle does this (or the linked pr) also carry bubbling out the model, tokens etc into the metadata api like we discussed?

@sicoyle
Copy link
Contributor Author

sicoyle commented Jan 5, 2026

@sicoyle does this (or the linked pr) also carry bubbling out the model, tokens etc into the metadata api like we discussed?

The model was the only thing that I can remember that we want bubbled out into the metadata api. I can look to PR that later today or tomorrow :)

Comment on lines -42 to -50
Parameters map[string]*anypb.Any `json:"parameters"`
ConversationContext string `json:"conversationContext"`
Temperature float64 `json:"temperature"`

// from metadata
Key string `json:"key"`
Model string `json:"model"`
Endpoints []string `json:"endpoints"`
Policy string `json:"loadBalancingPolicy"`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The “from metadata” fields were bubbling the Metadata field from the Conversations API (see https://github.com/dapr/dapr/blob/master/dapr/proto/runtime/v1/ai.proto#L43
), which allowed all of these fields to be passed through the request. This is an incorrect use of metadata. Components already expose their own metadata field, so there’s no need to bubble this information up from the API—contrib already handles it.

As a result, we can remove the following fields: Key, Endpoints, and Policy.

I also removed Parameters and ConversationContext, since these were surfaced but never actually used. All of this traces back to the original implementation, which I’m now cleaning up.

Signed-off-by: Samantha Coyle <[email protected]>
@sicoyle sicoyle requested review from JoshVanL and cicoyle January 5, 2026 22:48
Signed-off-by: Samantha Coyle <[email protected]>
Signed-off-by: Samantha Coyle <[email protected]>
@sicoyle
Copy link
Contributor Author

sicoyle commented Jan 5, 2026

ready for feedback please @cicoyle and @JoshVanL 🙏

@sicoyle
Copy link
Contributor Author

sicoyle commented Jan 6, 2026

ignore this please as I am WIP splitting this into different PRs

@sicoyle sicoyle changed the title feat: add resp format, timeout, prompt caching, & usage to conversation api [WIP splitting this up] feat: add resp format, timeout, prompt caching, & usage to conversation api Jan 6, 2026
@sicoyle sicoyle changed the title [WIP splitting this up] feat: add resp format, timeout, prompt caching, & usage to conversation api feat: add resp format, timeout to conversation api Jan 8, 2026
@sicoyle sicoyle changed the title feat: add resp format, timeout to conversation api feat: add resp format, timeout, model override to conversation api Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants