microsoft / microsoft/foundry-local

Add ability to modify chat template kwargs

Open
#808 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
2.6k
Forks
369
Avg merge
2d 17h
Merged PRs (30d)
39

Description

Currently there is no way to modify/override each model's chat template defaults. For example, this would be useful to disable text output of thinking content.

Ideally this would be configurable on a per-response basis, such as a `template_kwargs: dict = ...` parameter within `complete_streaming_chat`.

This will likely require coordination with downstream dependencies (`onnxruntime`) to add the plumbing needed to support this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the complete_streaming_chat entry point and tracing how chat template defaults reach the downstream onnxruntime dependency. Define the per-response template_kwargs flow and verify that an override, including disabling thinking-content text output, is accepted end to end.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
ai, api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.