Skip to content

Commit 59816da

Browse files
authored
Fix heavy tests failures (#1147)
1 parent 6d6a9ad commit 59816da

3 files changed

Lines changed: 24 additions & 8 deletions

File tree

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -876,6 +876,12 @@ abstract class ExecutorIntegrationTestBase {
876876
model.provider == LLMProvider.Bedrock || model.capabilities.contains(LLMCapability.Moderation),
877877
"Model $model does not support moderation"
878878
)
879+
880+
// KG-560 Bedrock models have guardrail configuration issues
881+
assumeTrue(
882+
model.id != "us.anthropic.claude-haiku-4-5-20251001-v1:0",
883+
"Bedrock Claude Haiku model has guardrail configuration issues"
884+
)
879885
val client = getLLMClient(model)
880886

881887
val prompt = prompt("test-harmful-content") {
@@ -900,6 +906,12 @@ abstract class ExecutorIntegrationTestBase {
900906
model.provider == LLMProvider.Bedrock || model.capabilities.contains(LLMCapability.Moderation),
901907
"Model $model does not support moderation"
902908
)
909+
910+
// KG-560 Bedrock models have guardrail configuration issues
911+
assumeTrue(
912+
model.id != "us.anthropic.claude-haiku-4-5-20251001-v1:0",
913+
"Bedrock Claude Haiku model has guardrail configuration issues"
914+
)
903915
val client = getLLMClient(model)
904916

905917
// Not harmful (without the answer)

integration-tests/src/jvmTest/kotlin/ai/koog/integration/tests/utils/RetryUtils.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ object RetryUtils {
2525
private const val OPEN_ROUTER_PARTS_ERROR =
2626
"Field 'id' is required for type with serial name 'ai.koog.prompt.executor.clients.openai.base.models.OpenAIToolCall', but it was missing at path:"
2727

28+
// External image URL download failures are third-party service issues
29+
private const val OPENAI_IMAGE_DOWNLOAD_ERROR = "Error while downloading"
30+
2831
private fun isThirdPartyError(e: Throwable): Boolean {
2932
val errorMessages = listOf(
3033
GOOGLE_429_ERROR,
@@ -37,6 +40,7 @@ object RetryUtils {
3740
OPENAI_500_ERROR,
3841
OPENAI_503_ERROR,
3942
OPENAI_LLM_CLIENT_500_ERROR,
43+
OPENAI_IMAGE_DOWNLOAD_ERROR,
4044
)
4145

4246
val message = e.message

prompt/prompt-executor/prompt-executor-clients/prompt-executor-openai-client-base/src/commonMain/kotlin/ai/koog/prompt/executor/clients/openai/base/models/OpenAIDataModels.kt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ public class OpenAIStreamToolCall(
326326
@Serializable
327327
public class OpenAIFunction(
328328
public val name: String,
329-
public val arguments: String
329+
public val arguments: String = ""
330330
)
331331

332332
/**
@@ -464,19 +464,19 @@ public class OpenAIStaticContent(public val content: Content) {
464464
* Exact effects are model-dependent.
465465
* If not set, the model/provider default applies.
466466
*
467-
* Serialized as `"minimal" | "low" | "medium" | "high"`.
467+
* Serialized as `"none" | "minimal" | "low" | "medium" | "high"`.
468468
*
469-
* See [reasoning_effort](https://platform.openai.com/docs/api-reference/chat/create#chat-create-reasoning_effort)
469+
* See [reasoning_effort](https://platform.openai.com/docs/api-reference/responses/create#responses_create-reasoning-effort)
470470
*/
471471
@Serializable
472472
public enum class ReasoningEffort {
473473
/**
474-
* Strongly limits internal reasoning to minimize latency and cost.
475-
* Best for simple, well-specified tasks where extra deliberation is unnecessary.
476-
* Serialized as `"minimal"`.
474+
* Disables reasoning.
475+
* Is not supported by models before gpt-5.1!
476+
* Serialized as `"none"`.
477477
*/
478-
@SerialName("minimal")
479-
MINIMAL,
478+
@SerialName("none")
479+
NONE,
480480

481481
/**
482482
* Allows a small amount of reasoning while prioritizing speed and efficiency.

0 commit comments

Comments
 (0)