ask-agent 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 16f5dbe983536b338fe5231296ff64a48777d230d782cb81ba14d11a8505ac91
4
- data.tar.gz: 4d5c8f49e66ce01dd41807c298c86f9ff9b0547c0636d18a61b38567a56e4ca1
3
+ metadata.gz: 4e56503ad4f2642bb671cfb6c1fe63b05dbfa507dbdc6fba048a822a2a4bbc74
4
+ data.tar.gz: 13e0fe8facaac2823e7b73d6aaf7abbb71404e5f557b9e318a66bf7f767e4eda
5
5
  SHA512:
6
- metadata.gz: d03ce2a1ec7461b5087e96014ac5b21689ce5fb41a7d8a161bfe5505839930fbf0e6fdfaad129d506ba3fbead429b52a12b854ab5c06f173aa6aae3ef2d9e4ad
7
- data.tar.gz: 76019686018d278a9ac50bc3259775424be29208b8e345e12574a130b8bcdca47a242172ddeff2a59817780418101d71051eb90130b6ef3f406a895e3e89bbab
6
+ metadata.gz: a4e45c5a696d28b887fdf63434fa304145428c6bf8c6dd14dec044c1d566267ce358ac4a347f761cbbee7c1b01e82faad8d4932ec21b35a8b528cbe217c1b36a
7
+ data.tar.gz: c41b5afbf3ae4e0a1e3899bfa8b3c128c0209377e78c23923ab3a5da7538d491da3d665d665914dc1f7f88a15210c0cbf5e47ab5f1110ed4b21d42f1ed9fc4cc
data/CHANGELOG.md CHANGED
@@ -1,9 +1,3 @@
1
- ## [0.4.1] — 2026-07-18
2
-
3
- ### Fixed
4
-
5
- - **`Chat#provider_config` now falls back to base provider name for credential lookup** — When a provider slug has a compound name like `opencode_go`, the method first tries `Ask::Auth.resolve(:opencode_go_api_key)` and if that returns nil, falls back to `Ask::Auth.resolve(:opencode_api_key)`. This lets users store credentials under the canonical provider name (e.g., `opencode.api_key` in Rails credentials) while using a specific variant provider (e.g., `opencode_go`).
6
-
7
1
  ## [0.4.0] — 2026-07-17
8
2
 
9
3
  ### Added
@@ -119,15 +119,15 @@ module Ask
119
119
  end
120
120
 
121
121
  def provider_config(slug)
122
- key = Ask::Auth.resolve(:"#{slug}_api_key") rescue nil
123
- # For compound provider slugs (e.g., opencode_go), fall back to the
124
- # base name (e.g., opencode) for credential lookup. This lets users
125
- # store credentials under the canonical provider name while using a
126
- # specific variant provider.
127
- if key.nil? && slug.to_s.include?("_")
128
- base = slug.to_s.split("_").first
129
- key = Ask::Auth.resolve(:"#{base}_api_key") rescue nil
122
+ # Try the full slug credential name first, then fall back to the
123
+ # base name for compound slugs (e.g., opencode_go opencode).
124
+ # The multi-name resolve tries each in order and returns the first match.
125
+ cred_names = [:"#{slug}_api_key"]
126
+ if slug.to_s.include?("_")
127
+ cred_names << :"#{slug.to_s.split("_").first}_api_key"
130
128
  end
129
+ key = Ask::Auth.resolve(*cred_names) rescue nil
130
+
131
131
  base_url = Ask::Auth.resolve(:"#{slug}_api_base") rescue nil
132
132
  config = { api_key: key }
133
133
  config[:"#{slug}_api_key"] = key
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ask
4
4
  module Agent
5
- VERSION = "0.4.1"
5
+ VERSION = "0.4.2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ask-agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaka Ruto