Skip to content

Commit c65d748

Browse files
authored
Migrate Anthropic client to KoogHttpClient (#1179)
* First step to provide other Http clients * Rename `type` to avoid serialization issues Future work: * Anthropic supports thinking streaming and built-in tool calls (https://platform.claude.com/docs/en/build-with-claude/streaming), but we can only add it to assistant message or our tools calls. We have to support it in future
1 parent a5c36d5 commit c65d748

File tree

6 files changed

+197
-175
lines changed

6 files changed

+197
-175
lines changed

integration-tests/src/jvmTest/kotlin/ai/koog/integration/tests/executor/ExecutorIntegrationTestBase.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,8 @@ abstract class ExecutorIntegrationTestBase {
538538

539539
withRetry {
540540
try {
541-
checkExecutorMediaResponse(getExecutor(model).execute(prompt, model).single())
541+
val response = getExecutor(model).execute(prompt, model).single()
542+
checkExecutorMediaResponse(response)
542543
} catch (e: LLMClientException) {
543544
when (scenario) {
544545
TextTestScenario.EMPTY_TEXT -> {

prompt/prompt-executor/prompt-executor-clients/prompt-executor-anthropic-client/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ kotlin {
1818
api(project(":prompt:prompt-executor:prompt-executor-clients"))
1919
api(project(":prompt:prompt-llm"))
2020
api(project(":prompt:prompt-model"))
21+
api(project(":http-client:http-client-ktor"))
2122
api(libs.kotlinx.coroutines.core)
2223
api(libs.kotlinx.datetime)
2324
api(libs.ktor.client.content.negotiation)

0 commit comments

Comments
 (0)