Skip to content

Conversation

@edenreich
Copy link
Collaborator

Summary

Sync the Rust SDK with the latest OpenAPI specification from inference-gateway.

Changes

  • Add FinishReason enum for completion finish reasons
  • Add ChatCompletionMessageToolCallChunk with index field for streaming
  • Add logprobs support (ChatCompletionTokenLogprob, TopLogprob, ChoiceLogprobs)
  • Add reasoning_content and refusal fields to streaming delta
  • Update Model.served_by to use Provider enum
  • Add A2A protocol support (list_agents, get_agent)
  • Add NotFound error variant

Closes #14

🤖 Generated with Claude Code

claude bot and others added 2 commits November 21, 2025 22:57
- Add FinishReason enum (Stop, Length, ToolCalls, ContentFilter, FunctionCall)
- Add ChatCompletionMessageToolCallChunk with index field for streaming
- Add ChatCompletionTokenLogprob, TopLogprob, ChoiceLogprobs for logprobs support
- Add reasoning_content and refusal fields to ChatCompletionStreamDelta
- Add reasoning_content field to Message struct
- Update Model.served_by from Option<String> to Provider enum
- Make all Model fields required (object, created, owned_by, served_by)
- Add A2AAgentCard and ListAgentsResponse types for A2A protocol support
- Add list_agents() and get_agent(id) methods to InferenceGatewayAPI trait
- Add NotFound error variant for 404 responses
- Add tests for A2A endpoints

Co-authored-by: Eden Reich <edenreich@users.noreply.github.com>

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@edenreich
Copy link
Collaborator Author

@claude you didn't download the latest openapi spec, I've just downloaded it - please now work on making the code in sync.

@claude
Copy link
Contributor

claude bot commented Nov 21, 2025

Claude finished @edenreich's task —— View job


Syncing SDK with OpenAPI Specification ✅

  • Analyze the latest OpenAPI specification
  • Identify differences between OpenAPI spec and current Rust code
  • Update Rust code to match the OpenAPI specification
  • Commit and push changes

Summary of changes:

  1. Added OllamaCloud and Mistral providers to the Provider enum
  2. Updated Display and TryFrom implementations for the new providers
  3. Added Serialize derive to ChatCompletionMessageToolCallChunk
  4. Added logprobs field to ChatCompletionChoice
  5. Added reasoning_format field to CreateChatCompletionRequest and CreateChatCompletionStreamResponse
  6. Updated all tests to include the new providers and logprobs field in mock responses

Commit: c56690c

--- |

- Add OllamaCloud and Mistral providers to Provider enum
- Update Display and TryFrom implementations for new providers
- Add Serialize derive to ChatCompletionMessageToolCallChunk
- Add logprobs field to ChatCompletionChoice
- Add reasoning_format field to request/response types
- Update all tests to include new providers and logprobs field

Co-authored-by: Eden Reich <edenreich@users.noreply.github.com>

🤖 Generated with [Claude Code](https://claude.ai/code)
@edenreich
Copy link
Collaborator Author

@claude Fix the CI

@claude
Copy link
Contributor

claude bot commented Nov 21, 2025

Claude finished @edenreich's task —— View job


Fixing CI ✅

  • Check CI status and identify failures
  • Analyze and fix the issues
  • Push the fixes

Summary: Fixed rustfmt formatting issue in src/lib.rs. The #[serde(rename = "supportsAuthenticatedExtendedCard", skip_serializing_if = "Option::is_none")] attribute on line 156 was too long and needed to be split into multiple lines per rustfmt rules.

Commit: a11c355
|

Co-authored-by: Eden Reich <edenreich@users.noreply.github.com>
@edenreich
Copy link
Collaborator Author

@claude Fix CI - tests are failing.

Also remove the A2A related code - it has been removed from the OpenAPI spec.

@claude
Copy link
Contributor

claude bot commented Nov 21, 2025

Claude finished @edenreich's task —— View job


Fixing CI and Removing A2A Code ✅

  • Check CI status and identify failing tests
  • Remove A2A related code from the SDK
  • Fix reasoning_format missing field in test
  • Commit and push changes

Summary of changes:

  1. Removed A2AAgentCard struct
  2. Removed ListAgentsResponse struct
  3. Removed list_agents() and get_agent() trait methods from InferenceGatewayAPI
  4. Removed A2A implementation methods from InferenceGatewayClient
  5. Removed 4 A2A-related tests (test_list_agents, test_list_agents_a2a_not_exposed, test_get_agent, test_get_agent_not_found)
  6. Added missing reasoning_format: None field in test_generate_request_serialization test

Commit: ce8830c

- Remove A2AAgentCard and ListAgentsResponse structs
- Remove list_agents() and get_agent() trait methods
- Remove A2A implementation methods from InferenceGatewayClient
- Remove A2A-related tests
- Add missing reasoning_format field in test_generate_request_serialization

Co-authored-by: Eden Reich <edenreich@users.noreply.github.com>

🤖 Generated with [Claude Code](https://claude.ai/code)
@edenreich edenreich merged commit b655389 into main Nov 21, 2025
1 check passed
@edenreich edenreich deleted the claude/issue-14-20251121-2253 branch November 21, 2025 23:20
github-actions bot pushed a commit that referenced this pull request Nov 21, 2025
## [0.12.0](0.11.0...0.12.0) (2025-11-21)

### ✨ Features

* Sync SDK with latest OpenAPI specification ([#15](#15)) ([b655389](b655389))
* Update default models and docs for flox ([5a3f97b](5a3f97b))

### 🐛 Bug Fixes

* resolve markdownlint violations in AGENTS.md ([8240142](8240142))

### 🔧 Miscellaneous

* Add .env.example ([1099147](1099147))
* Add infer CLI ([c9dfc98](c9dfc98))
* Add issue templates ([9626778](9626778))
* Add markdownlint ([398e3b6](398e3b6))
* Claude PR Assistant workflow ([#13](#13)) ([a52795d](a52795d))

### 📦 Miscellaneous

* Add flox environment ([bba25a4](bba25a4))
@github-actions
Copy link

🎉 This PR is included in version 0.12.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TASK] Download the latest OAS and ensure code is in sync

2 participants