rig icon indicating copy to clipboard operation
rig copied to clipboard

feat: Add the concept of warnings

Open Sytten opened this issue 5 months ago • 1 comments

  • [x] I have looked for existing issues (including closed) about this

Feature Request

I am looking at what the AI SDK is doing to get inspiration (https://github.com/vercel/ai) since it is the gold standard. I think we should add a concept of warnings.

Motivation

We want to be able to add more parameters to the CompletionRequest struct even if they are not supported by all providers. Things like a schema for the response. If a given provider doesn't support it you push to that warnings list

Proposal

#[non_exhaustive]
enum ModelWarning {
   UnsupportedSetting {
      setting: String,
      details: Option<String>
    }
    UnsupportedTool {
        tool: String,
        details: Option<String>
     }
     Other {
         message: String,
     }
}

Alternatives

  • Silently ignore
  • Untyped extra parameters (what we have right now)

Sytten avatar Jul 31 '25 15:07 Sytten