completion-kit 0.27.6 → 0.27.8

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: 9c50674dc904cf7935e92732b7b950bdde2a98f00e8ed07da024ff16f72d91bb
4
- data.tar.gz: c8355a39bfd6e21ae17dfa2b8ad408410966edc26bc6b0793ac97e0a7deb58b0
3
+ metadata.gz: 9d50041696a63ede061cec0eceb7e76e23ce4545337d08590e4f7ff07dd2c4d4
4
+ data.tar.gz: e54bd6b97f3815e4d665f9ba609b2718d1c8ffe97fe4c87581ae76310a6ece69
5
5
  SHA512:
6
- metadata.gz: 2d42858748734f9b5514226b8764a3b988148f13554a549e2af65d75be53def9355031c6f009264c9d2647ad8dd749ec9c8e86266662dfc25bd08d66c982982d
7
- data.tar.gz: 0f9157ea88d799c5ce19b0ac7a46812b5dda7b10b9faed7ff9c01b8f20a15a4e820aa00cbaa3c039c8bd2e9d001b4b02e1b9e49d5053e57e96cf0aa453e8196b
6
+ metadata.gz: 273b75a2a8ce5abac5b66ca387a849ec49d884f7e0b216536c55ed5c13a993a38567f66a8d763660d98ebf4d7e02135303b04c3df028abc61e1b3baba0d0dfad
7
+ data.tar.gz: '06280022cc288d3e27aea5b433f54488688fb15801891c55e500a4ab62b8a06eaf3cfb883a701c7167524cec6904ef213ab483d2b5ce299f54de1804ce8e1a68'
data/README.md CHANGED
@@ -86,6 +86,7 @@ CompletionKit discovers available models from each provider's API automatically.
86
86
  | **Anthropic** | `ANTHROPIC_API_KEY` | Claude Opus, Sonnet, Haiku |
87
87
  | **Ollama / local endpoint** | `OLLAMA_API_ENDPOINT` (default: `http://localhost:11434/v1`) | Any model you've `ollama pull`-ed, or any OpenAI-compatible local server (vLLM, LM Studio, llama.cpp) |
88
88
  | **OpenRouter** | `OPENROUTER_API_KEY` | 100+ models from 30+ providers through one API key |
89
+ | **Azure AI Foundry** | No env var — add via the Providers UI / a `ProviderCredential` (`api_key` + `api_endpoint` required, `api_version` optional) | Azure OpenAI deployments and Foundry projects |
89
90
 
90
91
  Set these as environment variables or configure them in the generated initializer. You can also add provider credentials through the web UI under Settings.
91
92
 
@@ -21,10 +21,10 @@ module CompletionKit
21
21
  end
22
22
 
23
23
  def stale_against_current_judge?
24
- return false unless metric_id && metric_version_id
25
- current_id = MetricVersion.current.where(metric_id: metric_id).limit(1).pick(:id)
26
- return false if current_id.nil?
27
- metric_version_id != current_id
24
+ return false unless metric_id && metric_version
25
+ current_number = MetricVersion.current.where(metric_id: metric_id).limit(1).pick(:version_number)
26
+ return false if current_number.nil?
27
+ metric_version.version_number != current_number
28
28
  end
29
29
 
30
30
  def as_json(options = {})
@@ -166,9 +166,9 @@ module CompletionKit
166
166
  review_pairs.each do |metric_id, version_id, metric_name|
167
167
  current = current_by_metric[metric_id]
168
168
  next if current.nil?
169
- next if version_id == current[:id]
170
169
  label = label_by_version[version_id]
171
170
  next if label.nil?
171
+ next if label == current[:label]
172
172
  summary[metric_id] ||= { metric_name: metric_name, current_label: current[:label], stale_count: 0, scored_labels: [] }
173
173
  summary[metric_id][:stale_count] += 1
174
174
  summary[metric_id][:scored_labels] |= [label]
@@ -5,7 +5,7 @@ module CompletionKit
5
5
 
6
6
  TOOLS = {
7
7
  "judges_replay" => {
8
- description: "Run the current judge against a dataset (scores existing outputs). Wraps runs_create with prompt_id omitted and output_column supplied. Re-judges existing dataset outputs so you can compare against human verdicts.",
8
+ description: "Create a scoring run for the current judge over a dataset's existing outputs (wraps runs_create with prompt_id omitted and output_column supplied). This only sets up the run; call runs_generate to actually re-judge the outputs so you can compare against human verdicts.",
9
9
  inputSchema: {
10
10
  type: "object",
11
11
  properties: {
@@ -20,7 +20,7 @@ module CompletionKit
20
20
  handler: :replay
21
21
  },
22
22
  "judges_compare" => {
23
- description: "Compare two metric versions' agreement stats side by side. Pass either two metric_version_ids or one metric_id with metric_version_a_id / metric_version_b_id.",
23
+ description: "Compare two versions of one metric's agreement stats side by side. Requires metric_id, metric_version_a_id, and metric_version_b_id (both versions must belong to that metric). Unavailable for check metrics.",
24
24
  inputSchema: {
25
25
  type: "object",
26
26
  properties: {
@@ -30,7 +30,7 @@
30
30
  <label for="ck-tab-datasets" class="ck-api-tabs__label">Datasets <span class="ck-api-tabs__count">5</span></label>
31
31
  <label for="ck-tab-metrics" class="ck-api-tabs__label">Metrics <span class="ck-api-tabs__count">10</span></label>
32
32
  <label for="ck-tab-metric-groups" class="ck-api-tabs__label">Metric Groups <span class="ck-api-tabs__count">5</span></label>
33
- <label for="ck-tab-agreements" class="ck-api-tabs__label">Agreements <span class="ck-api-tabs__count">3</span></label>
33
+ <label for="ck-tab-agreements" class="ck-api-tabs__label">Agreements <span class="ck-api-tabs__count">4</span></label>
34
34
  <label for="ck-tab-tags" class="ck-api-tabs__label">Tags <span class="ck-api-tabs__count">5</span></label>
35
35
  <label for="ck-tab-providers" class="ck-api-tabs__label">Providers <span class="ck-api-tabs__count">5</span></label>
36
36
  <label for="ck-tab-imports" class="ck-api-tabs__label">Imports <span class="ck-api-tabs__count">1</span></label>
@@ -83,7 +83,7 @@
83
83
  <p class="ck-copy">Create, version, and manage LLM prompt templates.</p>
84
84
  <div class="ck-api-endpoint">
85
85
  <p class="ck-api-method"><span class="ck-chip ck-chip--soft">GET</span> /api/v1/prompts</p>
86
- <p class="ck-meta-copy">List all prompts, ordered by most recent.</p>
86
+ <p class="ck-meta-copy">List all prompts, ordered by most recent. Supports pagination (<code>limit</code>, <code>offset</code>) and <code>tag[]</code> filtering.</p>
87
87
  <%= render "completion_kit/api_reference/example", base_url: base_url, token: token, real_token: real_token, cmd: "curl #{base_url}/api/v1/prompts \\\n -H \"Authorization: Bearer #{token}\"" %>
88
88
  </div>
89
89
  <div class="ck-api-endpoint">
@@ -94,7 +94,7 @@
94
94
  </div>
95
95
  <div class="ck-api-endpoint">
96
96
  <p class="ck-api-method"><span class="ck-chip ck-chip--soft">GET</span> /api/v1/prompts/:id</p>
97
- <p class="ck-meta-copy">Get a single prompt by ID.</p>
97
+ <p class="ck-meta-copy">Get a single prompt by numeric ID or slug.</p>
98
98
  </div>
99
99
  <%= render "completion_kit/api_reference/resource_list", title: "Your published prompts",
100
100
  items: published_prompts.map { |p|
@@ -103,7 +103,7 @@
103
103
  } %>
104
104
  <div class="ck-api-endpoint">
105
105
  <p class="ck-api-method"><span class="ck-chip ck-chip--soft">PATCH</span> /api/v1/prompts/:id</p>
106
- <p class="ck-meta-copy">Update a prompt. Accepts same params as create.</p>
106
+ <p class="ck-meta-copy">Update a prompt. Accepts same params as create. If the prompt has no runs it is updated in place; if it already has runs, a new published version is created and returned (with a new id), leaving the original unchanged.</p>
107
107
  <%= render "completion_kit/api_reference/example", base_url: base_url, token: token, real_token: real_token, cmd: "curl -X PATCH #{base_url}/api/v1/prompts/1 \\\n -H \"Authorization: Bearer #{token}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"template\": \"Summarize concisely: {{text}}\"}'" %>
108
108
  </div>
109
109
  <div class="ck-api-endpoint">
@@ -155,7 +155,7 @@
155
155
  </div>
156
156
  <div class="ck-api-endpoint">
157
157
  <p class="ck-api-method"><span class="ck-chip ck-chip--soft">POST</span> /api/v1/runs/:id/rerun</p>
158
- <p class="ck-meta-copy">Clone the run and start generating responses on the copy against the current prompt and metric versions. Returns the new run with 201 Created. Useful for capturing a fresh baseline after metric edits.</p>
158
+ <p class="ck-meta-copy">Clone the run and start generating responses on the copy against the current prompt and metric versions. Returns the new run with 202 Accepted. Useful for capturing a fresh baseline after metric edits.</p>
159
159
  <%= render "completion_kit/api_reference/example", base_url: base_url, token: token, real_token: real_token, cmd: "curl -X POST #{base_url}/api/v1/runs/1/rerun \\\n -H \"Authorization: Bearer #{token}\"" %>
160
160
  </div>
161
161
  <div class="ck-api-endpoint">
@@ -165,7 +165,7 @@
165
165
  </div>
166
166
  <div class="ck-api-endpoint">
167
167
  <p class="ck-api-method"><span class="ck-chip ck-chip--soft">GET</span> /api/v1/runs/:id/compare?with=:other_id</p>
168
- <p class="ck-meta-copy">Side-by-side comparison against another run. Returns <code>{left_run_id, right_run_id, metric_ids: [...], rows: [...]}</code> with one row per input case, per-metric scores on both sides, and the delta. Cases that exist on only one side are still returned with the missing side nulled out.</p>
168
+ <p class="ck-meta-copy">Side-by-side comparison against another run. Returns <code>{left_run_id, right_run_id, metric_ids: [...], rows: [...]}</code> with one row per input case, per-metric scores on both sides, and the delta. Rows are keyed by the left run's input cases: a case present only in the left run is returned with the right side nulled out, and a case present only in the right run is omitted.</p>
169
169
  <%= render "completion_kit/api_reference/example", base_url: base_url, token: token, real_token: real_token, cmd: "curl \"#{base_url}/api/v1/runs/1/compare?with=2\" \\\n -H \"Authorization: Bearer #{token}\"" %>
170
170
  </div>
171
171
  <div class="ck-api-endpoint">
@@ -185,7 +185,7 @@
185
185
  <div class="ck-api-endpoint">
186
186
  <p class="ck-api-method"><span class="ck-chip ck-chip--soft">GET</span> /api/v1/runs/:run_id/responses</p>
187
187
  <p class="ck-meta-copy">List responses for a run, including nested review scores.</p>
188
- <p class="ck-api-params"><strong>Optional filters:</strong>&ensp;<code>status</code> (<code>pending</code>, <code>succeeded</code>, <code>failed</code>), plus <code>limit</code> and <code>offset</code></p>
188
+ <p class="ck-api-params"><strong>Optional filters:</strong>&ensp;<code>status</code> (<code>pending</code>, <code>retrying</code>, <code>succeeded</code>, <code>failed</code>), plus <code>limit</code> and <code>offset</code></p>
189
189
  <%= render "completion_kit/api_reference/example", base_url: base_url, token: token, real_token: real_token, cmd: "curl #{base_url}/api/v1/runs/1/responses \\\n -H \"Authorization: Bearer #{token}\"" %>
190
190
  </div>
191
191
  <div class="ck-api-endpoint">
@@ -256,7 +256,7 @@
256
256
  </div>
257
257
  <div class="ck-api-endpoint">
258
258
  <p class="ck-api-method"><span class="ck-chip ck-chip--soft">POST</span> /api/v1/metrics/:id/suggest_variants</p>
259
- <p class="ck-meta-copy">Generate draft metric versions from the current disagreements. Returns 201 with the new draft versions, 422 if no disagreements exist or the model produced nothing usable.</p>
259
+ <p class="ck-meta-copy">Generate draft metric versions from the current disagreements. Only rubric-style (llm_judge) metrics can suggest variants. Returns 201 with the new draft versions, or 422 if the metric is a check (checks are exact and have no variants to suggest), if no disagreements exist, or if the model produced nothing usable.</p>
260
260
  <p class="ck-api-params"><strong>Optional:</strong>&ensp;<code>count</code>, <code>model</code></p>
261
261
  <%= render "completion_kit/api_reference/example", base_url: base_url, token: token, real_token: real_token, cmd: "curl -X POST #{base_url}/api/v1/metrics/1/suggest_variants \\\n -H \"Authorization: Bearer #{token}\"" %>
262
262
  </div>
@@ -294,7 +294,7 @@
294
294
  <div class="ck-api-endpoint">
295
295
  <p class="ck-api-method"><span class="ck-chip ck-chip--soft">POST</span> /api/v1/metric_groups</p>
296
296
  <p class="ck-meta-copy">Create a metric group.</p>
297
- <p class="ck-api-params"><strong>Required:</strong>&ensp;<code>name</code>&emsp;<strong>Optional:</strong>&ensp;<code>description</code>, <code>metric_ids</code> (array)</p>
297
+ <p class="ck-api-params"><strong>Required:</strong>&ensp;<code>name</code>&emsp;<strong>Optional:</strong>&ensp;<code>description</code>, <code>metric_ids</code> (array), <code>tag_names</code> (array)</p>
298
298
  <%= render "completion_kit/api_reference/example", base_url: base_url, token: token, real_token: real_token, cmd: "curl -X POST #{base_url}/api/v1/metric_groups \\\n -H \"Authorization: Bearer #{token}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"name\": \"core quality\", \"metric_ids\": [1, 2, 3]}'" %>
299
299
  </div>
300
300
  <div class="ck-api-endpoint">
@@ -312,6 +312,7 @@
312
312
  <div class="ck-api-tabs__panel">
313
313
  <h2 class="ck-section-title">Agreements</h2>
314
314
  <p class="ck-copy">Per-verdict feedback events on a response/metric pair: agree, disagree (with a corrected score and note), or borderline. Agreements capture the metric version that was current when the verdict was cast, which is what drives the trust signal and the "stale" indicators across the rest of the API.</p>
315
+ <p class="ck-meta-copy">All agreement endpoints require the <code>judge_agreement_enabled</code> configuration (on by default). When it is disabled every agreement action returns <code>404</code> with <code>{"error": "Agreement disabled"}</code>.</p>
315
316
  <div class="ck-api-endpoint">
316
317
  <p class="ck-api-method"><span class="ck-chip ck-chip--soft">GET</span> /api/v1/agreements</p>
317
318
  <p class="ck-meta-copy">List agreements across all runs. Supports filtering by any combination of the query params below.</p>
@@ -320,10 +321,14 @@
320
321
  </div>
321
322
  <div class="ck-api-endpoint">
322
323
  <p class="ck-api-method"><span class="ck-chip ck-chip--soft">POST</span> /api/v1/runs/:run_id/responses/:response_id/metrics/:metric_id/agreements</p>
323
- <p class="ck-meta-copy">Cast an agreement on a specific response/metric pair. The metric version on the record is set automatically from the run's review.</p>
324
- <p class="ck-api-params"><strong>Required:</strong>&ensp;<code>verdict</code>&emsp;<strong>Optional:</strong>&ensp;<code>corrected_score</code>, <code>note</code>, <code>created_by</code> (defaults to <code>"api"</code>)</p>
324
+ <p class="ck-meta-copy">Cast an agreement on a specific response/metric pair. The metric version on the record is set automatically from the run's review. Idempotent per <code>(response, metric, created_by)</code>: the first cast creates the agreement (201 Created), and re-casting for the same <code>created_by</code> updates it in place (200 OK) rather than creating a duplicate.</p>
325
+ <p class="ck-api-params"><strong>Required:</strong>&ensp;<code>verdict</code> (<code>agree</code>, <code>disagree</code>, or <code>borderline</code>); <code>corrected_score</code> (1&ndash;5) is required when <code>verdict</code> is <code>disagree</code>&emsp;<strong>Optional:</strong>&ensp;<code>corrected_score</code> (for <code>agree</code>/<code>borderline</code>), <code>note</code>, <code>created_by</code> (defaults to <code>"api"</code>)</p>
325
326
  <%= render "completion_kit/api_reference/example", base_url: base_url, token: token, real_token: real_token, cmd: "curl -X POST #{base_url}/api/v1/runs/1/responses/42/metrics/3/agreements \\\n -H \"Authorization: Bearer #{token}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"verdict\": \"disagree\", \"corrected_score\": 3, \"note\": \"too generous\", \"created_by\": \"alice\"}'" %>
326
327
  </div>
328
+ <div class="ck-api-endpoint">
329
+ <p class="ck-api-method"><span class="ck-chip ck-chip--soft">GET</span> /api/v1/runs/:run_id/responses/:response_id/metrics/:metric_id/agreements</p>
330
+ <p class="ck-meta-copy">List agreements scoped to a specific run, response, and metric &mdash; the nested equivalent of the top-level index filtered by those three ids.</p>
331
+ </div>
327
332
  <div class="ck-api-endpoint">
328
333
  <p class="ck-api-method"><span class="ck-chip" style="color: var(--ck-danger);">DELETE</span> /api/v1/agreements/:id</p>
329
334
  <p class="ck-meta-copy">Delete an agreement. Returns 204 No Content.</p>
@@ -332,7 +337,7 @@
332
337
 
333
338
  <div class="ck-api-tabs__panel">
334
339
  <h2 class="ck-section-title">Tags</h2>
335
- <p class="ck-copy">Domain labels you can attach to metrics, prompts, runs, and datasets. Tags are auto-assigned a color from a 10-color palette. Each index page can be filtered by one or more tags using <code>?tag[]=name</code> query params (OR semantics).</p>
340
+ <p class="ck-copy">Domain labels you can attach to metrics, prompts, runs, datasets, and metric groups. Tags are auto-assigned a color from a 10-color palette. Each index page can be filtered by one or more tags using <code>?tag[]=name</code> query params (OR semantics).</p>
336
341
  <div class="ck-api-endpoint">
337
342
  <p class="ck-api-method"><span class="ck-chip ck-chip--soft">GET</span> /api/v1/tags</p>
338
343
  <p class="ck-meta-copy">List all tags with name and color.</p>
@@ -355,7 +360,7 @@
355
360
  } %>
356
361
  <div class="ck-api-endpoint" style="padding-top: 1rem;">
357
362
  <p class="ck-kicker" style="margin-bottom: 0.5rem;">Tagging resources</p>
358
- <p class="ck-meta-copy">Metrics, prompts, runs, and datasets accept a <code>tag_names</code> array on their create and update endpoints. Passing a name that does not yet exist silently creates the tag. On PATCH, the list replaces all existing tags for that record (omit the field to leave tags unchanged).</p>
363
+ <p class="ck-meta-copy">Metrics, prompts, runs, datasets, and metric groups accept a <code>tag_names</code> array on their create and update endpoints. Passing a name that does not yet exist silently creates the tag. On PATCH, the list replaces all existing tags for that record (omit the field to leave tags unchanged).</p>
359
364
  <%= render "completion_kit/api_reference/example", base_url: base_url, token: token, real_token: real_token, cmd: "curl -X POST #{base_url}/api/v1/metrics \\\n -H \"Authorization: Bearer #{token}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"name\": \"Accuracy\", \"tag_names\": [\"real estate\"]}'" %>
360
365
  </div>
361
366
  <div class="ck-api-endpoint" style="padding-top: 1rem;">
@@ -367,7 +372,7 @@
367
372
  <div class="ck-mcp-tool"><code class="ck-mcp-tool__name">tags_update</code><span class="ck-mcp-tool__desc">Update a tag's name</span></div>
368
373
  <div class="ck-mcp-tool"><code class="ck-mcp-tool__name">tags_delete</code><span class="ck-mcp-tool__desc">Delete a tag and remove all its taggings</span></div>
369
374
  </div>
370
- <p class="ck-meta-copy" style="margin-top: 0.75rem;">The existing <code>metrics_create</code>, <code>metrics_update</code>, <code>prompts_create</code>, <code>prompts_update</code>, <code>runs_create</code>, <code>runs_update</code>, <code>datasets_create</code>, and <code>datasets_update</code> tools all accept a <code>tag_names</code> parameter with the same auto-create and replace semantics as the REST API.</p>
375
+ <p class="ck-meta-copy" style="margin-top: 0.75rem;">The existing <code>metrics_create</code>, <code>metrics_update</code>, <code>prompts_create</code>, <code>prompts_update</code>, <code>runs_create</code>, <code>runs_update</code>, <code>datasets_create</code>, <code>datasets_create_from_url</code>, <code>datasets_update</code>, <code>metric_groups_create</code>, and <code>metric_groups_update</code> tools all accept a <code>tag_names</code> parameter with the same auto-create and replace semantics as the REST API.</p>
371
376
  </div>
372
377
  </div>
373
378
 
@@ -380,14 +385,14 @@
380
385
  </div>
381
386
  <div class="ck-api-endpoint">
382
387
  <p class="ck-api-method"><span class="ck-chip ck-chip--soft">POST</span> /api/v1/provider_credentials</p>
383
- <p class="ck-meta-copy">Create a provider credential.</p>
384
- <p class="ck-api-params"><strong>Required:</strong>&ensp;<code>provider</code> (openai, anthropic, ollama, openrouter, azure_foundry), <code>api_key</code>&emsp;<strong>Optional:</strong>&ensp;<code>api_endpoint</code> (required when <code>provider</code> is <code>azure_foundry</code>), <code>api_version</code></p>
388
+ <p class="ck-meta-copy">Create a provider credential. Each provider may have only one credential; creating a second for an already-configured provider returns 422.</p>
389
+ <p class="ck-api-params"><strong>Required:</strong>&ensp;<code>provider</code> (openai, anthropic, ollama, openrouter, azure_foundry)&emsp;<strong>Optional:</strong>&ensp;<code>api_key</code> (not enforced by the API, but required in practice for hosted providers; local providers like ollama can omit it), <code>api_endpoint</code> (required when <code>provider</code> is <code>azure_foundry</code>), <code>api_version</code></p>
385
390
  <%= render "completion_kit/api_reference/example", base_url: base_url, token: token, real_token: real_token, cmd: "curl -X POST #{base_url}/api/v1/provider_credentials \\\n -H \"Authorization: Bearer #{token}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"provider\": \"openai\", \"api_key\": \"sk-...\"}'" %>
386
391
  <%= render "completion_kit/api_reference/example", base_url: base_url, token: token, real_token: real_token, cmd: "curl -X POST #{base_url}/api/v1/provider_credentials \\\n -H \"Authorization: Bearer #{token}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"provider\": \"azure_foundry\", \"api_key\": \"...\", \"api_endpoint\": \"https://my-resource.openai.azure.com\", \"api_version\": \"2024-10-21\"}'" %>
387
392
  </div>
388
393
  <div class="ck-api-endpoint">
389
394
  <p class="ck-api-method"><span class="ck-chip ck-chip--soft">GET</span>&ensp;<span class="ck-chip ck-chip--soft">PATCH</span>&ensp;<span class="ck-chip" style="color: var(--ck-danger);">DELETE</span> /api/v1/provider_credentials/:id</p>
390
- <p class="ck-meta-copy">Get, update, or delete a provider credential.</p>
395
+ <p class="ck-meta-copy">Get, update, or delete a provider credential. DELETE returns 422 (not 204) when the provider is still in use by prompts or judge runs; remove those references first.</p>
391
396
  <%= render "completion_kit/api_reference/example", base_url: base_url, token: token, real_token: real_token, cmd: "curl -X PATCH #{base_url}/api/v1/provider_credentials/1 \\\n -H \"Authorization: Bearer #{token}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"api_key\": \"sk-new...\"}'" %>
392
397
  </div>
393
398
  <%= render "completion_kit/api_reference/resource_list", title: "Your providers",
@@ -399,12 +404,12 @@
399
404
 
400
405
  <div class="ck-api-tabs__panel">
401
406
  <h2 class="ck-section-title">Imports</h2>
402
- <p class="ck-copy">Bring an existing <a href="https://www.promptfoo.dev" class="ck-link">promptfoo</a> config into CompletionKit in one call. Prompts, the test dataset, assert-based metrics, and providers are created where they map cleanly and skipped with a reason where they don't.</p>
407
+ <p class="ck-copy">Bring an existing <a href="https://www.promptfoo.dev" class="ck-link">promptfoo</a> config into CompletionKit in one call. Prompts, the test dataset, and assert-based metrics are created where they map cleanly and skipped with a reason where they don't. Providers are matched against your already-configured credentials; any referenced in the config but not yet configured are reported so you can add them.</p>
403
408
  <div class="ck-api-endpoint">
404
409
  <p class="ck-api-method"><span class="ck-chip ck-chip--soft">POST</span> /api/v1/imports/promptfoo</p>
405
410
  <p class="ck-meta-copy">Import a promptfooconfig.yaml. Send the YAML as a <code>config</code> param, or POST the raw YAML as the request body. Returns 201 with a mapping summary, or 422 if the YAML cannot be parsed.</p>
406
411
  <p class="ck-api-params"><strong>Request:</strong>&ensp;<code>config</code> (the YAML text) or a raw YAML request body</p>
407
- <p class="ck-api-params"><strong>Response 201:</strong>&ensp;<code>prompts</code>, <code>dataset</code>, <code>metrics</code>, and <code>providers</code>, each listing what was <code>created</code> and what was <code>skipped</code> (with a reason)</p>
412
+ <p class="ck-api-params"><strong>Response 201:</strong>&ensp;<code>prompts</code> and <code>metrics</code> each list what was <code>created</code> and what was <code>skipped</code> (with a reason); <code>dataset</code> is <code>{created, rows, columns}</code> (or <code>{skipped}</code>); <code>providers</code> is <code>{matched, unmatched}</code> (provider strings from the config)</p>
408
413
  <%= render "completion_kit/api_reference/example", base_url: base_url, token: token, real_token: real_token, cmd: "curl -X POST #{base_url}/api/v1/imports/promptfoo \\\n -H \"Authorization: Bearer #{token}\" \\\n -H \"Content-Type: application/x-yaml\" \\\n --data-binary @promptfooconfig.yaml" %>
409
414
  </div>
410
415
  </div>
@@ -1,3 +1,3 @@
1
1
  module CompletionKit
2
- VERSION = "0.27.6"
2
+ VERSION = "0.27.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: completion-kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.6
4
+ version: 0.27.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damien Bastin