Skip to content

feat: OpenAI compatibility #3

@andthattoo

Description

@andthattoo

Implement comprehensive test suite to ensure 100% compatibility with OpenAI API specification for dnet.

  • Validate all OpenAI API endpoints
  • Test request/response format compatibility
  • Verify error handling matches OpenAI behavior
  • Ensure streaming responses work correctly

Test Coverage Needed

  • /v1/chat/completions endpoint
    • Standard requests
    • Streaming responses
    • Function calling
    • All supported parameters (temperature, max_tokens, etc.)
  • /v1/embeddings endpoint
  • /v1/models endpoint
  • Authentication headers: the user will just be prompted to use dnet as the API key, although the API server will ignore the bearer token regardless (similar to Ollama)
  • Error response formats
  • Edge cases (empty requests, invalid parameters)

Acceptance Criteria

  • All tests pass against both OpenAI API and our implementation
  • Error codes and messages align with OpenAI standards

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesttestDescribe a missing test, or an issue with existing tests

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions