Skip to content

feat(llmgw): add llmGateway.decisions() for the gateway's /v1/decisions - #206

Draft
dmorrissey-aai wants to merge 1 commit into
mainfrom
dmorrissey/llmgw-decisions
Draft

dmorrissey-aai wants to merge 1 commit into
mainfrom
dmorrissey/llmgw-decisions

Conversation

@dmorrissey-aai

Copy link
Copy Markdown
Contributor

Adds client.llmGateway.decisions(request). It calls the LLM Gateway's POST /v1/decisions, which answers predicate, choice, and score questions about an input. This is the Node counterpart of AssemblyAI/assemblyai-python-sdk#292.

  • New types: DecisionRequest, DecisionQuestion, DecisionResponse, DecisionAnswer, DecisionProbability, and DecisionUsage. Like ChatCompletionRequest, the request type accepts untyped fields by name, and the gateway itself rejects unknown ones.
  • probabilities[].value is typed string | number: a choice value or a score level index.
  • Unit and integration tests, a CLAUDE.md section, a CHANGELOG entry, and a version bump to 4.43.0.

Testing

  • Unit suite: the new test passes. The utils.test.ts user-agent tests and the realtime.test.ts suite fail on main as well.
  • Live against production with gpt-6-luna:
    • the new integration test
    • a score question (level indexes come back as numbers), with an input-items list and prompt_cache_key
    • a 400 validation error and an unknown field each map to LlmGatewayError with .errors

🤖 Generated with Claude Code

- New `decisions(request)` on LlmGatewayService with Decision* request/response types; untyped request fields still pass through by name.
- Unit and integration tests, CLAUDE.md docs, CHANGELOG entry, version 4.43.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant