Skip to content

Add Files gRPC service proto and sync usage.proto#127

Merged
kzu merged 2 commits intomainfrom
dotnet-file-sync
Apr 30, 2026
Merged

Add Files gRPC service proto and sync usage.proto#127
kzu merged 2 commits intomainfrom
dotnet-file-sync

Conversation

@kzu
Copy link
Copy Markdown
Member

@kzu kzu commented Apr 23, 2026

Changes

New: src/xAI.Protocol/files.proto

Adds the Files gRPC service for managing uploaded files:

  • UploadFile (client streaming): upload in chunks up to 5 MB; 512 MB total cap; first message must be init with filename and optional TTL
  • ListFiles: paginated listing, sortable by created date, filename, or size
  • RetrieveFile: fetch file metadata by ID
  • DeleteFile: delete a file by ID
  • RetrieveFileContent (server streaming): download raw bytes or extracted text in up to 5 MB chunks

Updated: src/xAI.Protocol/usage.proto

  • Removed csharp_namespace option (synced from upstream)
  • Marked num_sources_used as deprecated (live search feature deprecated upstream)
  • Added cost_in_usd_ticks (optional int64): full price paid in USD ticks; 1 USD = 10,000,000,000 ticks

Updated: CI Workflows (.github/workflows/dotnet-env.yml, includes.yml)

  • Replaced hard-coded GH_TOKEN references with DEVLOOPED_TOKEN || GH_TOKEN via a PR_TOKEN job-level env var
  • Added conditional ✍ pull request step guard (if: env.PR_TOKEN != '')
  • Added ⚠️ skip pull request warning step when neither token is configured

Updated: src/xAI.Tests/ChatClientTests.cs

  • Added using File = System.IO.File; alias to resolve ambiguity with the new File proto message type

@kzu
Copy link
Copy Markdown
Member Author

kzu commented Apr 23, 2026

56 passed 56 passed 36 skipped

🧪 Details on Ubuntu 24.04.4 LTS

from retest v1.1.0 on .NET 10.0.7 with 💜 by @devlooped

@kzu kzu force-pushed the dotnet-file-sync branch 6 times, most recently from 26c2722 to fde3314 Compare April 30, 2026 12:15
# devlooped/oss

# xai-org/xai-proto
@kzu kzu force-pushed the dotnet-file-sync branch from fde3314 to 2b26f3a Compare April 30, 2026 12:47
@kzu kzu changed the title ⬆️ Bump files with dotnet-file sync 📦 Add Files gRPC service proto and sync usage.proto/CI workflow updates Apr 30, 2026
@kzu kzu added enhancement New feature or request and removed dependencies labels Apr 30, 2026
@kzu kzu merged commit 6525635 into main Apr 30, 2026
4 checks passed
@kzu kzu deleted the dotnet-file-sync branch April 30, 2026 15:29
@kzu kzu changed the title 📦 Add Files gRPC service proto and sync usage.proto/CI workflow updates Add Files gRPC service proto and sync usage.proto Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants