Skip to content

[Bug] API chat completion works once then fails multiple times over an hour or more before working again #306

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rurhrlaub opened this issue May 6, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@rurhrlaub
Copy link

🐛 Describe the Bug

I have created a python integration for Cortex XSOAR that performs research requests to augment Security Operation Center automated incident response processes. The initial request succeeds then all subsequent attempts fail for the exact same request for a period time (generally an hour more). The python integration executes within a docker container and the HTTP request never fails, but a system docker container timeout aborts the request. The request succeeds in 1 - 2 minutes and setting the docker timeout to 5, 10, 15, 20 minutes has no impact other than how long the integration request is allowed to executed before it times out.

✅ Expected Behavior

For the same request, expect it to succeed in approximately the same time frame.

❌ Actual Behavior

The same request fails until a significant amount of time has passed > 1 hour.

🔄 Steps to Reproduce

  1. Call the API with the following request:

From the integration code:

    ...
    try:
        print(args)
        response = self._http_request(
            method = "POST",
            url_suffix = "/chat/completions",
            json_data = args
        )
    except Exception as e:
    ...

Args:

{'model': 'sonar-deep-research', 'web_search_options': {'search_context_size': 'low'}, 'search_recency_filter': 'month', 'messages': [{'role': 'system', 'content': 'Be precise and concise.'}, {'role': 'user', 'content': 'Provide an overview of the malware campaigns in April 2025. Include information on threat actors, their targets, and the methods they used to attack.'}]}

  1. Observe the unexpected behavior.

📌 API Request & Response (if applicable)

There is no response since the docker container timeout.

🌍 Environment

  • **API Version: Current
  • **SDK (if applicable): Python 3.12
  • **Operating System: Ubuntu 20.04
    • **Authentication Type: API Key

📎 Logs or Screenshots (if applicable)

Add any logs or screenshots that can help debug the issue.

📝 Additional Context

Add any other context about the problem here.

@rurhrlaub rurhrlaub added the bug Something isn't working label May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant