Immutable solution version
Tool/Function response messages with role='tool' not accepted
Complete solution
How to fix 'Tool/Function response messages with role='tool' not accepted' in Together AI, straight from the verified resolution in gh:togethercomputer/together-python#113. Root cause plus what to change.
The problem
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 resolution
Contributor orangetin confirmed the bug and shipped the fix in together v1.1.3 (PyPI). Reporter marklysze confirmed it works.
Rule of thumb
the SDK's message-role validation was too strict; upgrading the client to >=1.1.3 resolves 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 1 · 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='tool' not accepted <span>— Vectle</span></a>