Skip to content
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

🔧 💥 #235: Extended the non-streaming chat error schema with new fields to give clients more context around the error #236

Merged
merged 12 commits into from
May 12, 2024

Conversation

roma-glushko
Copy link
Member

@roma-glushko roma-glushko commented May 5, 2024

Changes

  • Introduced a new error type to hold useful context like HTTP response status, error name, message
  • If all providers are unavailable, we are not throwing 500 error anymore but 503
  • Start throwing unknown_error with 500 status on unexpected exceptions
  • Predefined all static HTTP errors instead of creating them every time they occur
  • Introduced the name field on the error schema
  • Changed the req/response schema to snake_case (hopefully, to stick with it forever)
  • Removed Bruno collections (it doesn't cover all our needs like websocket or gRPC protocol)
  • Moved all schemas to api/schema package
  • Made router list API opaque
  • Changed the field name for overrides not to clash with defined statements in some languages

Testing

2024-05-05_15-40-45

TODO

Gotta update Python and Rust SDK to propagate the changeset

@roma-glushko roma-glushko added type:enhancement New feature or request api:http area:api model:language type:breaking 💥 Introduces a breaking changes to API, configuration or behavior introduced before labels May 5, 2024
@roma-glushko roma-glushko self-assigned this May 5, 2024
@roma-glushko roma-glushko linked an issue May 5, 2024 that may be closed by this pull request
Copy link

codecov bot commented May 5, 2024

Codecov Report

Attention: Patch coverage is 28.57143% with 45 lines in your changes are missing coverage. Please review.

Project coverage is 67.09%. Comparing base (3b37d0b) to head (78f70ef).

Files Patch % Lines
pkg/api/schemas/errors.go 10.52% 17 Missing ⚠️
pkg/api/http/handlers.go 0.00% 16 Missing ⚠️
pkg/routers/router.go 50.00% 3 Missing and 1 partial ⚠️
pkg/providers/cohere/finish_reason.go 25.00% 3 Missing ⚠️
pkg/providers/openai/finish_reasons.go 25.00% 3 Missing ⚠️
pkg/providers/bedrock/chat.go 0.00% 1 Missing ⚠️
pkg/routers/manager.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #236      +/-   ##
===========================================
- Coverage    67.24%   67.09%   -0.15%     
===========================================
  Files           78       79       +1     
  Lines         3633     3644      +11     
===========================================
+ Hits          2443     2445       +2     
- Misses        1061     1070       +9     
  Partials       129      129              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@roma-glushko roma-glushko changed the title #235: Extended the non-streaming chat error schema with new fields to give clients more context around the error 🔧 💥 #235: Extended the non-streaming chat error schema with new fields to give clients more context around the error May 5, 2024
@roma-glushko roma-glushko marked this pull request as draft May 5, 2024 12:49
@roma-glushko roma-glushko added this to the Glide: Public Preview milestone May 5, 2024
@roma-glushko roma-glushko marked this pull request as ready for review May 6, 2024 19:48
roma-glushko added a commit to EinStack/glide-py that referenced this pull request May 13, 2024
Applying breaking changes from EinStack/glide#236:

- changed the request/response field name format to snake_case
- renamed router_id, model_name, provider_id fields
- introduced error name in the error responses
gernest added a commit to gernest/glide that referenced this pull request May 15, 2024
* develop:
  🔧 💥 EinStack#235: Extended the non-streaming chat error schema with new fields to give clients more context around the error (EinStack#236)
  🔧 EinStack#220 Instrument API server (EinStack#255)
  🔧 EinStack#248 Disable span and metrics by default (EinStack#254)
roma-glushko added a commit that referenced this pull request Jun 24, 2024
The first major update with breaking changes to the language chat schemas 
and begging of work on instrumenting the gateway with OpenTelemetry.

### Added

- 🔧 Use github.com/EinStack/glide as module name to support go install cmd (@gernest)
- ✨🔧 Setup Open Telemetry Metrics and Traces (#237) (@gernest)
-  🔧 #221 Add B3 trace propagator (#242) (@gernest)
- 🔧 #241 Support overriding OTEL resource attributes (#243) (@gernest)
- 🔧 #248 Disable span and metrics by default (#254) (@gernest)
- 🔧 #220 Instrument API server with observability signals (#255) (@gernest)
- 🔧 #164 Make client connection pool configurable across all providers (#251) (@daesu)
- 🔧 Instrument gateway process (#256) (@gernest)
- 🔧 #262: adding connection pool for chat request and response (#271) (@tom-fitz)

### Changed

- 🔧 #238 Implements human-readable durations in config (#253) (@ppmdo)
- 🔧 #266: removing omitempty from response definition (#267) (@tom-fitz)

#### Breaking Changes

- 🔧 💥 #235: Extended the non-streaming chat error schema with new fields to give clients more context around the error (#236) (@roma-glushko)
- 💥 Convert all camelCase config fields to the snake_case in the provider configs (#260) (@roma-glushko)
- ✨💥 #153: Allow to pass multiple model-specific param overrides (#264) (@roma-glushko)

### Fixed

- 🐛 #217: Set build info correctly in Glide images (#218) (@roma-glushko)

### Security

- 🔒 Updated golang to 1.22.4 to address CVE-2024-24790 (#276) (@STAR-173)

### Miscellaneous

- 📝 Defined a way to manage EinStack Glide project (#234) (@roma-glushko)
- 👷 #219: Setup local telemetry stack with Jaeger, Grafana, VictoriaMetrics and OTEL Collector (#225) (@roma-glushko)
- 👷‍♂️ Added a new GH action to watch for glide activity stream (#239, #244) (@roma-glushko)
- ✨ Switched to the new docs (@roma-glushko)
- 🔧 #240: Automatically install air (#277, #270) (@ppmdo, @roma-glushko)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api:http area:api model:language type:breaking 💥 Introduces a breaking changes to API, configuration or behavior introduced before type:enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[API] Add error code field to the non-streaming chat errors
1 participant