tests/gateway/test_api_server.py::TestCheckRequirements::test_returns_true_when_aiohttp_available tests/gateway/test_api_server.py::TestCheckRequirements::test_returns_false_without_aiohttp tests/gateway/test_api_server.py::TestResponseStore::test_put_and_get tests/gateway/test_api_server.py::TestResponseStore::test_get_missing_returns_none tests/gateway/test_api_server.py::TestResponseStore::test_lru_eviction tests/gateway/test_api_server.py::TestResponseStore::test_access_refreshes_lru tests/gateway/test_api_server.py::TestResponseStore::test_update_existing_key tests/gateway/test_api_server.py::TestResponseStore::test_delete_existing tests/gateway/test_api_server.py::TestResponseStore::test_delete_missing tests/gateway/test_api_server.py::TestResponseStore::test_delete_clears_conversation_mapping tests/gateway/test_api_server.py::TestResponseStore::test_eviction_clears_conversation_mapping tests/gateway/test_api_server.py::TestResponseStore::test_file_store_created_owner_only_under_permissive_umask tests/gateway/test_api_server.py::TestIdempotencyCache::test_concurrent_same_key_and_fingerprint_runs_once tests/gateway/test_api_server.py::TestIdempotencyCache::test_different_fingerprint_does_not_reuse_inflight_task tests/gateway/test_api_server.py::TestIdempotencyCache::test_cancelled_waiter_does_not_drop_shared_inflight_task tests/gateway/test_api_server.py::TestAdapterInit::test_default_config tests/gateway/test_api_server.py::TestAdapterInit::test_custom_config_from_extra tests/gateway/test_api_server.py::TestAdapterInit::test_config_from_env tests/gateway/test_api_server.py::TestAdapterInit::test_invalid_port_from_env_falls_back_to_default tests/gateway/test_api_server.py::TestAdapterInit::test_create_agent_forwards_config_reasoning_effort tests/gateway/test_api_server.py::TestAdapterInit::test_create_agent_refreshes_max_iterations_from_runtime_config tests/gateway/test_api_server.py::TestAuth::test_no_key_configured_allows_all tests/gateway/test_api_server.py::TestAuth::test_valid_key_passes tests/gateway/test_api_server.py::TestAuth::test_invalid_key_returns_401 tests/gateway/test_api_server.py::TestAuth::test_missing_auth_header_returns_401 tests/gateway/test_api_server.py::TestAuth::test_malformed_auth_header_returns_401 tests/gateway/test_api_server.py::TestAgentExecution::test_run_agent_uses_session_id_as_task_id tests/gateway/test_api_server.py::TestHealthEndpoint::test_security_headers_present tests/gateway/test_api_server.py::TestHealthEndpoint::test_health_returns_ok tests/gateway/test_api_server.py::TestHealthEndpoint::test_health_reports_version tests/gateway/test_api_server.py::TestHealthEndpoint::test_v1_health_alias_returns_ok tests/gateway/test_api_server.py::TestHealthDetailedEndpoint::test_health_detailed_returns_ok tests/gateway/test_api_server.py::TestHealthDetailedEndpoint::test_health_detailed_no_runtime_status tests/gateway/test_api_server.py::TestHealthDetailedEndpoint::test_health_detailed_does_not_require_auth tests/gateway/test_api_server.py::TestModelsEndpoint::test_models_returns_hermes_agent tests/gateway/test_api_server.py::TestModelsEndpoint::test_models_returns_profile_name tests/gateway/test_api_server.py::TestModelsEndpoint::test_models_returns_explicit_model_name tests/gateway/test_api_server.py::TestModelsEndpoint::test_resolve_model_name_explicit tests/gateway/test_api_server.py::TestModelsEndpoint::test_resolve_model_name_default_profile tests/gateway/test_api_server.py::TestModelsEndpoint::test_resolve_model_name_named_profile tests/gateway/test_api_server.py::TestModelsEndpoint::test_models_requires_auth tests/gateway/test_api_server.py::TestModelsEndpoint::test_models_with_valid_auth tests/gateway/test_api_server.py::TestCapabilitiesEndpoint::test_capabilities_advertises_plugin_safe_contract tests/gateway/test_api_server.py::TestCapabilitiesEndpoint::test_capabilities_requires_auth_when_key_configured tests/gateway/test_api_server.py::TestSkillsEndpoint::test_skills_returns_list_envelope tests/gateway/test_api_server.py::TestSkillsEndpoint::test_skills_handles_enumeration_failure tests/gateway/test_api_server.py::TestSkillsEndpoint::test_skills_requires_auth_when_key_configured tests/gateway/test_api_server.py::TestToolsetsEndpoint::test_toolsets_returns_resolved_tools tests/gateway/test_api_server.py::TestToolsetsEndpoint::test_toolsets_handles_resolution_failure_per_toolset tests/gateway/test_api_server.py::TestToolsetsEndpoint::test_toolsets_requires_auth_when_key_configured tests/gateway/test_api_server.py::TestChatCompletionsEndpoint::test_invalid_json_returns_400 tests/gateway/test_api_server.py::TestChatCompletionsEndpoint::test_missing_messages_returns_400 tests/gateway/test_api_server.py::TestChatCompletionsEndpoint::test_empty_messages_returns_400 tests/gateway/test_api_server.py::TestChatCompletionsEndpoint::test_stream_true_returns_sse tests/gateway/test_api_server.py::TestChatCompletionsEndpoint::test_stream_string_false_returns_json_completion tests/gateway/test_api_server.py::TestChatCompletionsEndpoint::test_stream_task_done_callback_enqueues_eos_for_chat_completions tests/gateway/test_api_server.py::TestChatCompletionsEndpoint::test_stream_sends_keepalive_during_quiet_tool_gap tests/gateway/test_api_server.py::TestChatCompletionsEndpoint::test_stream_survives_tool_call_none_sentinel tests/gateway/test_api_server.py::TestChatCompletionsEndpoint::test_stream_includes_tool_progress tests/gateway/test_api_server.py::TestChatCompletionsEndpoint::test_stream_tool_progress_skips_internal_events tests/gateway/test_api_server.py::TestChatCompletionsEndpoint::test_stream_emits_tool_lifecycle_with_call_id tests/gateway/test_api_server.py::TestChatCompletionsEndpoint::test_stream_tool_lifecycle_skips_internal_and_orphan_completes tests/gateway/test_api_server.py::TestChatCompletionsEndpoint::test_no_user_message_returns_400 tests/gateway/test_api_server.py::TestChatCompletionsEndpoint::test_successful_completion tests/gateway/test_api_server.py::TestChatCompletionsEndpoint::test_system_prompt_extracted tests/gateway/test_api_server.py::TestChatCompletionsEndpoint::test_conversation_history_passed tests/gateway/test_api_server.py::TestChatCompletionsEndpoint::test_agent_error_returns_500 tests/gateway/test_api_server.py::TestChatCompletionsEndpoint::test_stable_session_id_across_turns tests/gateway/test_api_server.py::TestChatCompletionsEndpoint::test_different_conversations_get_different_session_ids tests/gateway/test_api_server.py::TestDeriveChatSessionId::test_deterministic tests/gateway/test_api_server.py::TestDeriveChatSessionId::test_prefix tests/gateway/test_api_server.py::TestDeriveChatSessionId::test_different_system_prompt tests/gateway/test_api_server.py::TestDeriveChatSessionId::test_different_first_message tests/gateway/test_api_server.py::TestDeriveChatSessionId::test_none_system_prompt tests/gateway/test_api_server.py::TestResponsesEndpoint::test_missing_input_returns_400 tests/gateway/test_api_server.py::TestResponsesEndpoint::test_invalid_json_returns_400 tests/gateway/test_api_server.py::TestResponsesEndpoint::test_successful_response_with_string_input tests/gateway/test_api_server.py::TestResponsesEndpoint::test_successful_response_with_array_input tests/gateway/test_api_server.py::TestResponsesEndpoint::test_instructions_as_ephemeral_prompt tests/gateway/test_api_server.py::TestResponsesEndpoint::test_previous_response_id_chaining tests/gateway/test_api_server.py::TestResponsesEndpoint::test_previous_response_id_stores_full_agent_transcript_once tests/gateway/test_api_server.py::TestResponsesEndpoint::test_previous_response_id_outputs_only_current_turn_items tests/gateway/test_api_server.py::TestResponsesEndpoint::test_previous_response_id_preserves_session tests/gateway/test_api_server.py::TestResponsesEndpoint::test_invalid_previous_response_id_returns_404 tests/gateway/test_api_server.py::TestResponsesEndpoint::test_store_false_does_not_store tests/gateway/test_api_server.py::TestResponsesEndpoint::test_store_string_false_does_not_store tests/gateway/test_api_server.py::TestResponsesEndpoint::test_instructions_inherited_from_previous tests/gateway/test_api_server.py::TestResponsesEndpoint::test_agent_error_returns_500 tests/gateway/test_api_server.py::TestResponsesEndpoint::test_invalid_input_type_returns_400 tests/gateway/test_api_server.py::TestResponsesStreaming::test_stream_true_returns_responses_sse tests/gateway/test_api_server.py::TestResponsesStreaming::test_stream_string_false_returns_json_response tests/gateway/test_api_server.py::TestResponsesStreaming::test_stream_task_done_callback_enqueues_eos_for_responses tests/gateway/test_api_server.py::TestResponsesStreaming::test_stream_emits_function_call_and_output_items tests/gateway/test_api_server.py::TestResponsesStreaming::test_streamed_response_is_stored_for_get tests/gateway/test_api_server.py::TestResponsesStreaming::test_streamed_previous_response_id_stores_full_agent_transcript_once tests/gateway/test_api_server.py::TestResponsesStreaming::test_stream_cancelled_persists_incomplete_snapshot tests/gateway/test_api_server.py::TestResponsesStreaming::test_stream_client_disconnect_persists_incomplete_snapshot tests/gateway/test_api_server.py::TestEndpointAuth::test_chat_completions_requires_auth tests/gateway/test_api_server.py::TestEndpointAuth::test_responses_requires_auth tests/gateway/test_api_server.py::TestEndpointAuth::test_models_requires_auth tests/gateway/test_api_server.py::TestEndpointAuth::test_health_does_not_require_auth tests/gateway/test_api_server.py::TestConfigIntegration::test_platform_enum_has_api_server tests/gateway/test_api_server.py::TestConfigIntegration::test_env_override_enables_api_server tests/gateway/test_api_server.py::TestConfigIntegration::test_env_override_with_key tests/gateway/test_api_server.py::TestConfigIntegration::test_env_override_port_and_host tests/gateway/test_api_server.py::TestConfigIntegration::test_env_override_cors_origins tests/gateway/test_api_server.py::TestConfigIntegration::test_api_server_in_connected_platforms tests/gateway/test_api_server.py::TestConfigIntegration::test_api_server_not_in_connected_when_disabled tests/gateway/test_api_server.py::TestMultipleSystemMessages::test_multiple_system_messages_concatenated tests/gateway/test_api_server.py::TestSendMethod::test_send_returns_not_supported tests/gateway/test_api_server.py::TestGetResponse::test_get_stored_response tests/gateway/test_api_server.py::TestGetResponse::test_get_not_found tests/gateway/test_api_server.py::TestGetResponse::test_get_requires_auth tests/gateway/test_api_server.py::TestDeleteResponse::test_delete_stored_response tests/gateway/test_api_server.py::TestDeleteResponse::test_delete_not_found tests/gateway/test_api_server.py::TestDeleteResponse::test_delete_requires_auth tests/gateway/test_api_server.py::TestToolCallsInOutput::test_tool_calls_in_output tests/gateway/test_api_server.py::TestToolCallsInOutput::test_no_tool_calls_still_works tests/gateway/test_api_server.py::TestUsageCounting::test_responses_usage tests/gateway/test_api_server.py::TestUsageCounting::test_chat_completions_usage tests/gateway/test_api_server.py::TestTruncation::test_truncation_auto_limits_history tests/gateway/test_api_server.py::TestTruncation::test_no_truncation_keeps_full_history tests/gateway/test_api_server.py::TestChatCompletionsAgentIncomplete::test_truncation_with_partial_text_uses_length_finish_reason tests/gateway/test_api_server.py::TestChatCompletionsAgentIncomplete::test_failure_with_no_text_returns_502_error_envelope tests/gateway/test_api_server.py::TestChatCompletionsAgentIncomplete::test_normal_completion_unchanged tests/gateway/test_api_server.py::TestCORS::test_origin_allowed_for_non_browser_client tests/gateway/test_api_server.py::TestCORS::test_origin_rejected_by_default tests/gateway/test_api_server.py::TestCORS::test_origin_allowed_for_allowlist_match tests/gateway/test_api_server.py::TestCORS::test_cors_headers_for_origin_disabled_by_default tests/gateway/test_api_server.py::TestCORS::test_cors_headers_for_origin_matches_allowlist tests/gateway/test_api_server.py::TestCORS::test_cors_headers_for_origin_rejects_unknown_origin tests/gateway/test_api_server.py::TestCORS::test_cors_headers_not_present_by_default tests/gateway/test_api_server.py::TestCORS::test_browser_origin_rejected_by_default tests/gateway/test_api_server.py::TestCORS::test_cors_options_preflight_rejected_by_default tests/gateway/test_api_server.py::TestCORS::test_cors_headers_present_for_allowed_origin tests/gateway/test_api_server.py::TestCORS::test_cors_allows_idempotency_key_header tests/gateway/test_api_server.py::TestCORS::test_cors_sets_vary_origin_header tests/gateway/test_api_server.py::TestCORS::test_cors_options_preflight_allowed_for_configured_origin tests/gateway/test_api_server.py::TestCORS::test_cors_preflight_sets_max_age tests/gateway/test_api_server.py::TestConversationParameter::test_conversation_creates_new tests/gateway/test_api_server.py::TestConversationParameter::test_conversation_chains_automatically tests/gateway/test_api_server.py::TestConversationParameter::test_conversation_and_previous_response_id_conflict tests/gateway/test_api_server.py::TestConversationParameter::test_separate_conversations_are_isolated tests/gateway/test_api_server.py::TestConversationParameter::test_conversation_store_false_no_mapping tests/gateway/test_api_server.py::TestConversationParameter::test_conversation_reuse_after_eviction_no_404 tests/gateway/test_api_server.py::TestSessionIdHeader::test_new_session_response_includes_session_id_header tests/gateway/test_api_server.py::TestSessionIdHeader::test_provided_session_id_is_used_and_echoed tests/gateway/test_api_server.py::TestSessionIdHeader::test_provided_session_id_loads_history_from_db tests/gateway/test_api_server.py::TestSessionIdHeader::test_db_failure_falls_back_to_empty_history tests/gateway/test_api_server.py::TestSessionKeyHeader::test_session_key_passed_to_agent_and_echoed tests/gateway/test_api_server.py::TestSessionKeyHeader::test_session_key_independent_of_session_id tests/gateway/test_api_server.py::TestSessionKeyHeader::test_session_key_absent_yields_none tests/gateway/test_api_server.py::TestSessionKeyHeader::test_session_key_rejected_without_api_key tests/gateway/test_api_server.py::TestSessionKeyHeader::test_session_key_rejects_control_chars tests/gateway/test_api_server.py::TestSessionKeyHeader::test_session_key_rejects_oversized tests/gateway/test_api_server.py::TestSessionKeyHeader::test_session_key_threads_into_create_agent tests/gateway/test_api_server.py::TestSessionKeyHeader::test_responses_endpoint_accepts_session_key tests/gateway/test_api_server.py::TestSessionKeyHeader::test_capabilities_advertises_session_key_header