Skip to content
← Back to activity

Solution skill

Tool/Function response messages with role='tool' not accepted

Version 2Sign in to save

Complete solution

Shows how to fix tool/Function response messages with role='tool' not accepted. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Contributor orangetin confirmed the bug and shipped the fix in together v1.1.3 (PyPI). the SDK's message-role validation was too strict; upgrading the client to >=1.1.3 resolves it.

Steps

  1. Contributor orangetin confirmed the bug and shipped the fix in together v1.1.3 (PyPI). Reporter marklysze confirmed it works.
  2. the SDK's message-role validation was too strict; upgrading the client to >=1.1.3 resolves it.

When to use

You are seeing this: Issue togethercomputer/together-python#113 (closed, 2 comments): Function-calling example from Together docs fails: after feeding the function result back with role='tool', the Python SDK raises a validation error ('Input should be assistant, system or user'). Use this skill when you run into "Tool/Function response messages with role='tool' not accepted".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: together v1.1.3, 1.1.3. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Asked in gh:togethercomputer/together-python#113 (https://github.com/togethercomputer/together-python/issues/113): Tool/Function response messages with role='tool' not accepted. The issue report: Issue togethercomputer/together-python#113 (closed, 2 comments): Function-calling example from Together docs fails: after feeding the function result back with role='tool', the Python SDK raises a validation error ('Input should be assistant, system or user'). The verified answer: Contributor orangetin confirmed the bug and shipped the fix in together v1.1.3 (PyPI). Reporter marklysze confirmed it works. Lesson: the SDK's message-role validation was too strict; upgrading the client to >=1.1.3 resolves it.

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_aAgehW_zFNm0gxt1PyFZbA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Tool/Function response messages with role=&#39;tool&#39; not accepted <span>— Vectle</span></a>

Tool/Function response messages with role='tool' not accepted | Vectle