Documentation
¶
Index ¶
- func SkipIfNoAPIKey(t testing.TB, provider string)
- func TestBaseURLConfiguration(t testing.TB, client chat.Client, expectedURL string)
- func TestEmptyToolResultsHandling(t testing.TB, client chat.Client)
- func TestHeaderConfiguration(t testing.TB, client chat.Client, expectedHeaders map[string]string)
- func TestMessagePersistenceAfterRestore(t *testing.T, client chat.Client)
- func TestNoDuplicateMessages(t *testing.T, client chat.Client)
- func TestStreaming(t testing.TB, client chat.Client)
- func TestStreamingResponse(t testing.TB, client chat.Client)
- func TestSystemReminderWithToolCalls(t testing.TB, client chat.Client)
- func TestTextBeforeToolCallsPreserved(t *testing.T, client chat.Client)
- func TestThinkingPreservedInHistory(t *testing.T, client chat.Client)
- func TestThinkingPreservedWithToolCalls(t *testing.T, client chat.Client)
- func TestTokenUsageCumulative(t testing.TB, client chat.Client)
- func TestToolCallAndResultStreamEvents(t testing.TB, client chat.Client)
- func TestToolCallStreamEvents(t testing.TB, client chat.Client)
- func TestToolsSummarizesFile(t testing.TB, client chat.Client)
- func TestWritesFile(t testing.TB, client chat.Client)
- type BaseURLValidator
- type HeadersValidator
- type IntegrationConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SkipIfNoAPIKey ¶
SkipIfNoAPIKey skips the test if the API key for the provider is not set
func TestBaseURLConfiguration ¶
TestBaseURLConfiguration validates that BaseURL is properly configured in the client
func TestEmptyToolResultsHandling ¶
TestEmptyToolResultsHandling tests that clients properly handle empty tool results without causing API errors
func TestHeaderConfiguration ¶
TestHeaderConfiguration validates that custom headers are properly configured in the client
func TestMessagePersistenceAfterRestore ¶
TestMessagePersistenceAfterRestore tests that messages are not duplicated when a session is restored from persistence and new messages are sent. This is a regression test for a bug where user messages were being pre-added to the store before calling Message(), causing them to be stored twice.
func TestNoDuplicateMessages ¶
TestNoDuplicateMessages tests that messages are not duplicated in history This is a regression test for a bug where chat clients were adding messages to their state even though the messages were already in the initial history
func TestStreaming ¶
TestStreaming is an alias for TestStreamingResponse for consistency
func TestStreamingResponse ¶
TestStreamingResponse tests streaming functionality with system dynamics prompt
func TestSystemReminderWithToolCalls ¶
TestSystemReminderWithToolCalls tests that system reminders are properly injected after tool execution
func TestTextBeforeToolCallsPreserved ¶
TestTextBeforeToolCallsPreserved tests that text content emitted before tool calls is preserved in message history. This is a regression test for a bug where initial text content was lost when the model emitted text, then made tool calls.
func TestThinkingPreservedInHistory ¶
TestThinkingPreservedInHistory tests that thinking content is preserved in message history for models that support thinking/reasoning. This test only applies to thinking-capable models like Claude Opus 4 and Sonnet 4.
func TestThinkingPreservedWithToolCalls ¶
TestThinkingPreservedWithToolCalls tests that thinking content is preserved alongside tool calls This ensures that when a model thinks and then calls tools, the thinking is retained in history
func TestTokenUsageCumulative ¶
TestTokenUsageCumulative tests that TokenUsage returns cumulative token counts across multiple messages
func TestToolCallAndResultStreamEvents ¶
TestToolCallAndResultStreamEvents tests that both tool call and tool result events are emitted during streaming
func TestToolCallStreamEvents ¶
TestToolCallStreamEvents tests that tool call events are emitted during streaming
func TestToolsSummarizesFile ¶
TestToolsSummarizesFile tests tool calling functionality with filesystem tools
Types ¶
type BaseURLValidator ¶
type BaseURLValidator interface {
BaseURL() string
}
BaseURLValidator is an interface that clients can implement to expose their base URL for testing
type HeadersValidator ¶
HeadersValidator is an interface that clients can implement to expose their custom headers for testing