• William Zhang's avatar
    refactor: New config types for tool calls (#4575) · 44e8600a
    William Zhang authored
    * Why?
    
    We would like the ability to configure different parser types. Prior to
    this commit, only the JSON parser could be configured.
    
    * What?
    
    This commit refactors the tool parser config in the following ways:
    - the `format` and `json` fields of `ToolParserConfig` are merged into
      a single `config` field that is a "discriminated union" type. Each
      parser type can declare its own configuration options.
    - a `XmlParserConfig` is defined with a default factory method that
      corresponds to the Qwen3 coder configuration.
    - affected calls and tests are adjusted.
    44e8600a
parser.rs 15.5 KB