Commit f6f4db5

mo khan <mo@mokhan.ca>
2026-09-07 05:22:41
feat!: migrate to Elelem.configure
elelem core removed Elelem::Providers/Plugins in favor of a single Elelem::Config registered via Elelem.configure. Bump elelem dependency to ~> 0.11 to match. Claude-Session: https://claude.ai/code/session_01DUuj4amvRrPxDnHPHBkvz5
1 parent 7c80753
Changed files (2)
lib/elelem/anthropic.rb
@@ -8,11 +8,13 @@ require "uri"
 require_relative "anthropic/version"
 require_relative "anthropic/client"
 
-Elelem::Providers.register(:anthropic) do
-  api_key = ENV.fetch("ANTHROPIC_API_KEY")
-  Elelem::Anthropic::Client.new(
-    endpoint: "https://api.anthropic.com/v1/messages",
-    headers: { "x-api-key" => api_key, "anthropic-version" => "2023-06-01" },
-    model: ENV.fetch("ANTHROPIC_MODEL", "claude-opus-4-5-20250514")
-  )
+Elelem.configure do |config|
+  config.provider(:anthropic) do
+    api_key = ENV.fetch("ANTHROPIC_API_KEY")
+    Elelem::Anthropic::Client.new(
+      endpoint: "https://api.anthropic.com/v1/messages",
+      headers: { "x-api-key" => api_key, "anthropic-version" => "2023-06-01" },
+      model: ENV.fetch("ANTHROPIC_MODEL", "claude-opus-4-5-20250514")
+    )
+  end
 end
elelem-anthropic.gemspec
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
   spec.executables = ["elelem-anthropic"]
   spec.require_paths = ["lib"]
 
-  spec.add_dependency "elelem", "~> 0.10"
+  spec.add_dependency "elelem", "~> 0.11"
   spec.add_dependency "json", "~> 2.21"
   spec.add_dependency "net-http", "~> 0.9"
   spec.add_dependency "uri", "~> 1.1"