-
- Downloads
Define different service names per LLM client
`Gitlab::Llm::Concerns::CircuitBreaker` requires `service_name` to be defined. Before this change, we are only using a single `service_name` and that means all client will use a single circuit. If a single provider fails and the circuit opens, all providers will be affected. To prevent that, since we have different clients (e.g. OpenAI, Vertex, Anthropic), we define a specific service name per client. This also includes a fix to `ExponentialBackoff` concern to raise the correct exception to avoid a `NameError`.
parent
155c7561
No related branches found
No related tags found
Showing
- ee/lib/gitlab/llm/anthropic/client.rb 4 additions, 0 deletionsee/lib/gitlab/llm/anthropic/client.rb
- ee/lib/gitlab/llm/concerns/exponential_backoff.rb 4 additions, 5 deletionsee/lib/gitlab/llm/concerns/exponential_backoff.rb
- ee/lib/gitlab/llm/open_ai/client.rb 4 additions, 0 deletionsee/lib/gitlab/llm/open_ai/client.rb
- ee/lib/gitlab/llm/vertex_ai/client.rb 4 additions, 0 deletionsee/lib/gitlab/llm/vertex_ai/client.rb
- ee/spec/lib/gitlab/llm/concerns/exponential_backoff_spec.rb 19 additions, 0 deletionsee/spec/lib/gitlab/llm/concerns/exponential_backoff_spec.rb
Please register or sign in to comment