Skip to content

Comments

API Docs: Add type field in the API docs for POST /config endpoint#609

Merged
Prajna1999 merged 3 commits intomainfrom
fix/config-docs
Feb 19, 2026
Merged

API Docs: Add type field in the API docs for POST /config endpoint#609
Prajna1999 merged 3 commits intomainfrom
fix/config-docs

Conversation

@Prajna1999
Copy link
Collaborator

@Prajna1999 Prajna1999 commented Feb 17, 2026

Summary

Target issue is #TBD
Add type field to the config creation API docs

Checklist

Before submitting a pull request, please ensure that you mark these task.

  • Ran fastapi run --reload app/main.py or docker compose up in the repository root and test.
  • If you've fixed a bug or added code that is tested and has test cases.

Notes

Please add here if any other information is required for the reviewer.

Summary by CodeRabbit

  • Documentation
    • Clarified three config blob types ("text", "stt", "tts") in API configuration docs.
    • Updated example to include "type":"text" and added model-specific guidance: "text" for OpenAI, "stt" and "tts" for Gemini.
    • Minor formatting and guidance updates to emphasize preserving configuration history.

@coderabbitai
Copy link

coderabbitai bot commented Feb 17, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

Documentation clarifies three configuration blob types—text, stt, and tts—and adds a type field in examples. Notes state text is applicable to OpenAI models, while stt and tts apply only to Gemini models; configuration history guidance remains.

Changes

Cohort / File(s) Summary
Documentation Updates
backend/app/api/docs/config/create.md
Added type field to config examples and clarified three blob types: text (OpenAI-only) and stt, tts (Gemini-only). Minor formatting and guidance adjustments; preserved configuration history note.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐇 I hopped through docs with a nibble and grin,
Three types I planted—text, stt, tts within.
OpenAI gets text, Gemini sings two tunes,
Configs now clearer beneath the moon.
🌙✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a type field to the API docs for the POST /config endpoint, which matches the summary of changes that clarified config blob types in the documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/config-docs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Prajna1999 Prajna1999 self-assigned this Feb 17, 2026
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (3)
backend/app/api/docs/config/create.md (3)

15-31: Mark type as required in the docs.

The example adds type, but the doc doesn’t say it’s mandatory. Please explicitly state that config_blob.completion.type is required and limited to text | stt | tts, matching validation behavior.

As per coding guidelines, “In the kaapi-backend repository, the type field in config_blob.completion (for both NativeCompletionConfig and KaapiCompletionConfig) is compulsory/mandatory during config creation and validation ensures it will never be missing. Valid values are "text", "stt", or "tts".”

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@backend/app/api/docs/config/create.md` around lines 15 - 31, Update the docs
to mark config_blob.completion.type as required and document its allowed values;
specifically state that config_blob.completion.type is mandatory (for both
NativeCompletionConfig and KaapiCompletionConfig) and must be one of "text" |
"stt" | "tts" to match validation/creation behavior. Locate the example block
that shows config_blob and add a concise sentence near the completion fields
explicitly declaring the requirement and the three permitted values so the docs
align with the backend validation.

12-12: Tighten wording to avoid redundancy.

“Supports three types of config blob types” repeats “types.” Consider “Supports three config blob types: ‘text’, ‘stt’, and ‘tts’.”

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@backend/app/api/docs/config/create.md` at line 12, Replace the redundant
phrase "Supports three types of config blob types; \"text\", \"stt\" and
\"tts\"." with the tightened wording "Supports three config blob types: 'text',
'stt', and 'tts'." to remove the duplicated word "types" and use a colon with
consistent punctuation around the listed blob types.

21-22: Fix minor JSON formatting for readability.

Add a space after the colon to match the rest of the example.

Suggested edit
-      "type":"text",
+      "type": "text",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@backend/app/api/docs/config/create.md` around lines 21 - 22, Update the JSON
example to match the repo's spacing style by adding a space after the colon for
the "type" property; replace the fragment `"type":"text",` with the spaced form
`"type": "text",` so it is consistent with the following `"params": {` entry and
improves readability in the create.md example.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@backend/app/api/docs/config/create.md`:
- Around line 15-31: Update the docs to mark config_blob.completion.type as
required and document its allowed values; specifically state that
config_blob.completion.type is mandatory (for both NativeCompletionConfig and
KaapiCompletionConfig) and must be one of "text" | "stt" | "tts" to match
validation/creation behavior. Locate the example block that shows config_blob
and add a concise sentence near the completion fields explicitly declaring the
requirement and the three permitted values so the docs align with the backend
validation.
- Line 12: Replace the redundant phrase "Supports three types of config blob
types; \"text\", \"stt\" and \"tts\"." with the tightened wording "Supports
three config blob types: 'text', 'stt', and 'tts'." to remove the duplicated
word "types" and use a colon with consistent punctuation around the listed blob
types.
- Around line 21-22: Update the JSON example to match the repo's spacing style
by adding a space after the colon for the "type" property; replace the fragment
`"type":"text",` with the spaced form `"type": "text",` so it is consistent with
the following `"params": {` entry and improves readability in the create.md
example.

@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

The configuration name must be unique within your project. Once created,
you can create additional versions to track parameter changes while
maintaining the configuration history.
maintaining the configuration history. Type "stt" and "tts" only applicable for Gemini models.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

first , use text line should come, and then "type stt and tss only applicable" should come, and adding "are" before only will make it better

@nishika26 nishika26 removed the request for review from AkhileshNegi February 18, 2026 16:15
@Prajna1999 Prajna1999 moved this to In Progress in Kaapi-dev Feb 19, 2026
@Prajna1999 Prajna1999 merged commit 40699c9 into main Feb 19, 2026
3 checks passed
@Prajna1999 Prajna1999 deleted the fix/config-docs branch February 19, 2026 06:30
@github-project-automation github-project-automation bot moved this from In Progress to Closed in Kaapi-dev Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

3 participants