Skip to content

feat: implement DeepSeek R1 backend with function calling support #94#959

Open
jhawpetoss6-collab wants to merge 1 commit intocrestalnetwork:mainfrom
jhawpetoss6-collab:strike/deepseek-r1-support
Open

feat: implement DeepSeek R1 backend with function calling support #94#959
jhawpetoss6-collab wants to merge 1 commit intocrestalnetwork:mainfrom
jhawpetoss6-collab:strike/deepseek-r1-support

Conversation

@jhawpetoss6-collab
Copy link
Copy Markdown

This PR implements the requested DeepSeek R1 support for IntentKit (#94).

Changes:

  • Added DeepSeekR1Backend in intentkit/backends/deepseek/.
  • Support for DeepSeek-Reasoner model.
  • Enabled function calling logic for the R1 series.

/claim #94

Copy link
Copy Markdown

@JiwaniZakir JiwaniZakir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In r1_backend.py, the call method does no error handling on the HTTP response — response.json() will raise a JSONDecodeError on non-200 responses (e.g., 401 invalid key, 429 rate limit, 500 server error), and even a successful parse will silently return an error payload that the caller has no way to distinguish from a valid completion. At minimum, response.raise_for_status() should be called before .json(), and the constructor should validate that self.api_key is not None rather than letting it surface as a confusing Bearer None auth failure at request time. Additionally, passing "tools": None when no tools are provided will likely cause a validation error from the DeepSeek API — the key should be omitted entirely when tools is None (e.g., conditionally add it to the payload dict). Finally, there's no timeout on the requests.post call, which means a hanging upstream response will block the caller in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants