Skip to content

Conversation

@dkalinowski
Copy link
Collaborator

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR modifies the GPT-OSS chat template to properly support built-in tools (python, browser) according to OpenAI Harmony format specifications, and adds an Apache 2.0 license header.

Changes:

  • Added Apache 2.0 license header with Intel copyright
  • Updated built-in tool rendering to use analysis channel instead of commentary channel
  • Fixed message constraint rendering and added support for previous reasoning_content messages

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +339 to +344
{%- set last_tool_call.name = tool_call.name %}
{%- else %}
{{- "<|channel|>commentary to=functions." + tool_call.name + " " }}
{{- (tool_call.content_type if tool_call.content_type is defined else "<|constrain|>json") + "<|message|>" }}
{%- set last_tool_call.name = tool_call.name %}
{%- endif %}
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

The assignment of last_tool_call.name is duplicated in both branches of the if-else statement. This can be moved outside the conditional block (after line 344) to avoid redundancy.

Suggested change
{%- set last_tool_call.name = tool_call.name %}
{%- else %}
{{- "<|channel|>commentary to=functions." + tool_call.name + " " }}
{{- (tool_call.content_type if tool_call.content_type is defined else "<|constrain|>json") + "<|message|>" }}
{%- set last_tool_call.name = tool_call.name %}
{%- endif %}
{%- else %}
{{- "<|channel|>commentary to=functions." + tool_call.name + " " }}
{{- (tool_call.content_type if tool_call.content_type is defined else "<|constrain|>json") + "<|message|>" }}
{%- endif %}
{%- set last_tool_call.name = tool_call.name %}

Copilot uses AI. Check for mistakes.
Comment on lines +339 to +344
{%- set last_tool_call.name = tool_call.name %}
{%- else %}
{{- "<|channel|>commentary to=functions." + tool_call.name + " " }}
{{- (tool_call.content_type if tool_call.content_type is defined else "<|constrain|>json") + "<|message|>" }}
{%- set last_tool_call.name = tool_call.name %}
{%- endif %}
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

The assignment of last_tool_call.name is duplicated in both branches of the if-else statement. This can be moved outside the conditional block (after line 344) to avoid redundancy.

Suggested change
{%- set last_tool_call.name = tool_call.name %}
{%- else %}
{{- "<|channel|>commentary to=functions." + tool_call.name + " " }}
{{- (tool_call.content_type if tool_call.content_type is defined else "<|constrain|>json") + "<|message|>" }}
{%- set last_tool_call.name = tool_call.name %}
{%- endif %}
{%- else %}
{{- "<|channel|>commentary to=functions." + tool_call.name + " " }}
{{- (tool_call.content_type if tool_call.content_type is defined else "<|constrain|>json") + "<|message|>" }}
{%- endif %}
{%- set last_tool_call.name = tool_call.name %}

Copilot uses AI. Check for mistakes.
@dkalinowski dkalinowski changed the title Gpt-oss chat template modifications to support built-in tools, added license Gpt-oss chat template modifications to support built-in tools, added license, switch to default low reasoning Feb 9, 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