Skip to content

Commit f7a2532

Browse files
committed
refactor(embedding-providers): rename --inline-api-key to --provider-api-key
Renames the flag (and Rust struct field) on `embedding-providers create` and `embedding-providers update` from `--inline-api-key` / `inline_api_key` to `--provider-api-key` / `provider_api_key`. Why: - Pairs naturally with the existing `--provider-type` flag on the same subcommand (consistent prefix family). - Self-documenting: this is the embedding service's own API key (e.g. an OpenAI sk-... key), not the user's Hotdata auth credential. - Avoids the clap field-id collision with the global `Cli::api_key` that motivated the original rename, but does so via a name that reads more naturally than `--inline-api-key`. The JSON request body field stays `api_key` per the OpenAPI schema — only the user-facing CLI flag and Rust field are renamed.
1 parent 5d6f250 commit f7a2532

4 files changed

Lines changed: 21 additions & 21 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,15 +248,15 @@ hotdata indexes delete --dataset-id <id> --name <name>
248248
hotdata embedding-providers list [-o table|json|yaml]
249249
hotdata embedding-providers get <id> [-o table|json|yaml]
250250
hotdata embedding-providers create --name <name> --provider-type service|local \
251-
[--config '<json>'] [--inline-api-key <key> | --secret-name <name>]
251+
[--config '<json>'] [--provider-api-key <key> | --secret-name <name>]
252252
hotdata embedding-providers update <id> [--name <name>] [--config '<json>'] \
253-
[--inline-api-key <key> | --secret-name <name>]
253+
[--provider-api-key <key> | --secret-name <name>]
254254
hotdata embedding-providers delete <id>
255255
```
256256

257257
- `list`/`get` show registered providers (system providers like `sys_emb_openai` come pre-configured).
258-
- `--inline-api-key` auto-creates a managed secret for the provider; `--secret-name` references an existing secret. They are mutually exclusive.
259-
- The flag is `--inline-api-key` (not `--api-key`) to avoid colliding with the global `--api-key` auth flag.
258+
- `--provider-api-key` auto-creates a managed secret for the provider; `--secret-name` references an existing secret. They are mutually exclusive.
259+
- `--provider-api-key` pairs with `--provider-type` and avoids colliding with the global `--api-key` (Hotdata auth).
260260

261261
## Results
262262

skills/hotdata/SKILL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,12 +343,12 @@ hotdata indexes delete --dataset-id <dataset_id> --name <name>
343343
hotdata embedding-providers list [--workspace-id <workspace_id>] [--output table|json|yaml]
344344
hotdata embedding-providers get <id> [--workspace-id <workspace_id>] [--output table|json|yaml]
345345
hotdata embedding-providers create --name <name> --provider-type service|local \
346-
[--config '<json>'] [--inline-api-key <key> | --secret-name <name>] [--workspace-id <workspace_id>]
347-
hotdata embedding-providers update <id> [--name <name>] [--config '<json>'] [--inline-api-key <key> | --secret-name <name>]
346+
[--config '<json>'] [--provider-api-key <key> | --secret-name <name>] [--workspace-id <workspace_id>]
347+
hotdata embedding-providers update <id> [--name <name>] [--config '<json>'] [--provider-api-key <key> | --secret-name <name>]
348348
hotdata embedding-providers delete <id> [--workspace-id <workspace_id>]
349349
```
350350
- System providers (e.g. `sys_emb_openai`) come pre-configured. `list` shows IDs to pass to `--embedding-provider-id`.
351-
- `--inline-api-key` (not `--api-key`, to avoid the global auth flag) auto-creates a managed secret. `--secret-name` references an existing secret. Mutually exclusive.
351+
- `--provider-api-key` (the embedding service's own key, e.g. an OpenAI `sk-...`) auto-creates a managed secret. Pairs with `--provider-type`; named to avoid colliding with the global `--api-key` (Hotdata auth). `--secret-name` references an existing secret. Mutually exclusive.
352352

353353
### Jobs
354354
```

src/command.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -793,11 +793,12 @@ pub enum EmbeddingProvidersCommands {
793793
#[arg(long)]
794794
config: Option<String>,
795795

796-
/// Inline API key (auto-creates a managed secret). Mutually exclusive with --secret-name.
797-
/// Named `--inline-api-key` (and field `inline_api_key`) to avoid collision with the
798-
/// global `--api-key` / `Cli::api_key` auth flag.
799-
#[arg(long = "inline-api-key", conflicts_with = "secret_name")]
800-
inline_api_key: Option<String>,
796+
/// The provider's own API key (e.g. an OpenAI sk-... key). Auto-creates a
797+
/// managed secret. Mutually exclusive with --secret-name. Named
798+
/// `--provider-api-key` to pair with `--provider-type` and to avoid colliding
799+
/// with the global `--api-key` (Hotdata auth) flag.
800+
#[arg(long = "provider-api-key", conflicts_with = "secret_name")]
801+
provider_api_key: Option<String>,
801802

802803
/// Reference an existing secret by name (for service providers)
803804
#[arg(long)]
@@ -821,11 +822,10 @@ pub enum EmbeddingProvidersCommands {
821822
#[arg(long)]
822823
config: Option<String>,
823824

824-
/// New inline API key (replaces or creates the managed secret).
825-
/// Named `--inline-api-key` (and field `inline_api_key`) to avoid collision with the
826-
/// global `--api-key` / `Cli::api_key` auth flag.
827-
#[arg(long = "inline-api-key", conflicts_with = "secret_name")]
828-
inline_api_key: Option<String>,
825+
/// New provider API key (replaces or creates the managed secret).
826+
/// See `embedding-providers create --provider-api-key` for naming rationale.
827+
#[arg(long = "provider-api-key", conflicts_with = "secret_name")]
828+
provider_api_key: Option<String>,
829829

830830
/// New secret name to reference
831831
#[arg(long)]

src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -519,31 +519,31 @@ fn main() {
519519
name,
520520
provider_type,
521521
config,
522-
inline_api_key,
522+
provider_api_key,
523523
secret_name,
524524
output,
525525
} => embedding_providers::create(
526526
&workspace_id,
527527
&name,
528528
&provider_type,
529529
config.as_deref(),
530-
inline_api_key.as_deref(),
530+
provider_api_key.as_deref(),
531531
secret_name.as_deref(),
532532
&output,
533533
),
534534
EmbeddingProvidersCommands::Update {
535535
id,
536536
name,
537537
config,
538-
inline_api_key,
538+
provider_api_key,
539539
secret_name,
540540
output,
541541
} => embedding_providers::update(
542542
&workspace_id,
543543
&id,
544544
name.as_deref(),
545545
config.as_deref(),
546-
inline_api_key.as_deref(),
546+
provider_api_key.as_deref(),
547547
secret_name.as_deref(),
548548
&output,
549549
),

0 commit comments

Comments
 (0)