- Add guard assertion before non-null click on custom code switch
- Use await act(async ...) for timer advancement to avoid act warnings
- Pin locale in date range assertion for CI determinism
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds /key/info, /key/list, /key/aliases, and /team/daily/activity
to the hardcoded PERMISSION_OPTIONS in TeamSSOSettings.tsx.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
LangSmith reads the Cost column from outputs.usage_metadata.total_cost,
but LangsmithLogger._prepare_log_data never wrote to that key. The
response_cost was already computed in StandardLoggingPayload but was
not forwarded to the outputs dict.
Inject usage_metadata with input_tokens, output_tokens, total_tokens,
and total_cost into the outputs dict so LangSmith can display cost.
Fixes#24001
Made-with: Cursor
Resolved conflicts in ScoreChart.test.tsx and HelpLink.test.tsx by
preferring origin/main's renderWithProviders pattern and merging
unique tests from both branches.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove Ant Design CSS class selector coupling in ExportFormatSelector test
- Lift mock fns out of TestTable component body to enable callback assertions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add explicit vi import to ScoreChart.test.tsx
- Use custom matcher for I/O modes to avoid cross-element text issues
- Use version-agnostic regex for Save button assertion
- Add comments noting placeholder data in GuardrailConfig tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add typeof string guards to all array element returns in resolveMode
to prevent non-string values from sneaking through via any-widening.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace unsafe `as string[]` cast in modeMatches with runtime type
check via `.some()`.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Move vi.useRealTimers() to afterEach for proper cleanup
- Use label-based DOM queries instead of fragile positional indexes
- Remove leftover debug console.log from AgentHubTableColumns.tsx
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add modeMatches() helper so array guardrail_mode values (e.g.
["pre_call", "post_call"]) place the entry in all matching timeline
buckets, not just the first. Updated test to verify both buckets.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The backend type for guardrail_mode is Optional[Union[str, List[str], Dict]]
but the UI typed it as just string, causing a crash when .replace() was
called on null/object/array values.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
list_team_v2 had 51 statements (limit 50). Extract the team-to-response-model
conversion loop into a helper function to satisfy ruff PLR0915.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Document how to send Vertex Priority PayGo headers and explain how trafficType maps to service-tier pricing in LiteLLM, including an embedded flow diagram for quick understanding.
Made-with: Cursor
When scanning backward over counted messages, preserve old behavior for
adjacent assistant turns by inserting user_continue if the immediate
previous raw message is assistant. This handles malformed
assistant(tool_calls)->assistant(no-tool-calls) inputs without splitting
valid assistant(tool_calls)->tool chains.
Made-with: Cursor
- aresponses() now pops prompt_id from kwargs after the async hook runs
and passes merged_optional_params via _async_prompt_merged_params.
responses() checks for this internal kwarg first and skips the sync
hook entirely when present — eliminating double-merge of template
messages.
- merged_optional_params from async_get_chat_completion_prompt is no
longer discarded (_); it flows through to local_vars in responses().
- Async tests now assert get_chat_completion_prompt.assert_not_called()
to directly detect any double-execution regression.
Made-with: Cursor
- Populate container_id on streaming code_interpreter_results by
re-emitting at message_delta when container info arrives
- Reconstruct Pydantic OutputCodeInterpreterCall objects from plain
dicts in _extract_tool_result_output_items so responses_output
has uniform types across streaming and non-streaming paths
- test_non_bash_tool_result_skipped: verifies text_editor results produce
zero code_interpreter_call items
- test_end_to_end_streaming_chunks_to_code_interpreter_output: exercises
full path from Anthropic SSE chunks through ModelResponseIterator,
stream_chunk_builder, and _extract_tool_result_output_items without
a live server
Skip non-bash tool result types (e.g. text_editor_code_execution_tool_result)
to avoid producing empty code_interpreter_call items in Responses API output.
Replace str(content) fallback with empty string so non-dict content
(e.g. list-shaped text_editor results) produces outputs=None instead
of raw Python object representations in logs.
- Empty stdout/stderr now produces outputs=None (matching OpenAI parity)
instead of outputs=[{logs:""}], in both streaming and non-streaming paths
- Fix test fixture to use real Anthropic type "bash_code_execution_tool_result"
instead of "code_execution_tool_result"
- Add test for empty-output → outputs=None behavior
- Add unit tests for _extract_tool_result_output_items: Pydantic objects,
plain dicts (post-model_dump), empty/missing provider_specific_fields,
and in-place substitution preserving output ordering