Skip to content

Commit b7c0cb0

Browse files
committed
fix: pass thinking kwargs in build_assistant_turn_token_ids, handle missing fullEpisode
- build_assistant_turn_token_ids now passes _thinking_kwargs() to apply_chat_template, consistent with _build_prompt_token_ids and build_tool_response_suffix_token_ids - View selector no longer silently renders nothing when fullEpisode is null and user selected text/episode view — falls back to turns view or shows a placeholder message Made-with: Cursor
1 parent 6e4f020 commit b7c0cb0

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

eval_protocol/integrations/fireworks_v1_completions_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,13 @@ def build_assistant_turn_token_ids(self, *, assistant_message: Dict[str, Any]) -
290290
tokenizer = self._get_tokenizer()
291291
sanitized_messages = _sanitize_messages_for_template(messages=[assistant_message])
292292
token_ids: Any
293+
thinking_kw = self._thinking_kwargs()
293294
try:
294295
token_ids = tokenizer.apply_chat_template(
295296
sanitized_messages,
296297
tokenize=True,
297298
add_generation_prompt=False,
299+
**thinking_kw,
298300
)
299301
except Exception as exc:
300302
logger.debug("Tokenizer assistant turn template failed, using fallback text prompt: %s", exc)

vite-app/src/components/TokenDebugView.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ export const TokenDebugView = ({ extra }: TokenDebugViewProps) => {
584584
colorMode={colorMode}
585585
showIds={showIds}
586586
/>
587-
) : (
587+
) : tokenTurnTraces.length > 0 ? (
588588
tokenTurnTraces.map((trace, i) => (
589589
<TurnSection
590590
key={i}
@@ -593,6 +593,10 @@ export const TokenDebugView = ({ extra }: TokenDebugViewProps) => {
593593
showIds={showIds}
594594
/>
595595
))
596+
) : (
597+
<div className="text-xs text-gray-400 italic p-2">
598+
No token data available for this view
599+
</div>
596600
)}
597601
</div>
598602
</div>

0 commit comments

Comments
 (0)