Skip to content

feat(clients): Agent Studio v1#6097

Open
Fluf22 wants to merge 77 commits into
mainfrom
fix/generators
Open

feat(clients): Agent Studio v1#6097
Fluf22 wants to merge 77 commits into
mainfrom
fix/generators

Conversation

@Fluf22
Copy link
Copy Markdown
Collaborator

@Fluf22 Fluf22 commented Mar 12, 2026

Jira: API-446 API-447 API-448 API-449 API-450 API-451 API-452 API-453 API-456 API-457 API-458 API-459

Summary

Full Agent Studio integration: streaming support, new specs, client generation across all languages.

Specs

  • New agent-studio OpenAPI specs from upstream (feedback, secret keys, allowed domains endpoints)
  • Removed stale schemas (AgentCompletionResponse, UsageV4/V5, AssistantMessage*Response, etc.)
  • Fixed FacetFilters-OutputUnion circular self-reference
  • Removed format annotations (uuid, date, date-time, uri) for cleaner generation
  • Added x-timeouts, customRequest path, and x-acl on secret-key endpoints
  • Renamed getConfigurationgetApplicationConfiguration to avoid Go method conflict
  • Added x-enum-varnames on VoteEnum (integer 0/1 can't be identifiers in most languages)
  • Added ErrorBase schema reference for Go client error handling

Generators & templates

  • Python: modelNameMapping for ValidationErrorAgentStudioValidationError (pydantic conflict)
  • Go: wrapcheck lint exclusion for ChunkedPush calls (nolint directives get stripped by formatter)
  • Go: cleaned up search_helpers.mustache nolint placement

Clients (from prior stacked PRs)

  • Response streaming support across all languages
  • 204 No Content handling
  • Streaming CTS test generation
  • JavaScript: agent-studio bundled into algoliasearch as non-standalone client
  • Lenient JSON assertion helpers for e2e tests
  • Null parameter and nullable field handling in test generation
  • Scala trait generation fix
  • Kotlin isSimpleObject handling, array variant resolution in ParametersWithDataType

@Fluf22 Fluf22 requested a review from a team as a code owner March 12, 2026 13:15
@algolia-bot
Copy link
Copy Markdown
Collaborator

algolia-bot commented Mar 12, 2026

✔️ Code generated!

Name Link
🪓 Triggered by c1bbef4d620f0f3bc64518fca300475c047d9201
🍃 Generated commit 576bc0152aee6df2b74d6820742be21a9a187576
🌲 Generated branch generated/fix/generators
📊 Benchmark results

Benchmarks performed on the method using a mock server, the results might not reflect the real-world performance.

Language Req/s
javascript 2288
go 2171
php 1795
csharp 1615
python 1403
java 1139
ruby 969
swift 472
scala 23

eric-zaharia
eric-zaharia previously approved these changes Mar 25, 2026
Copy link
Copy Markdown
Contributor

@eric-zaharia eric-zaharia left a comment

Choose a reason for hiding this comment

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

Looks good!

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented May 1, 2026

Not up to standards ⛔

🔴 Issues 3 critical · 7 high

Alerts:

⚠ 10 issues (≤ 0 issues of at least high severity)

Results:
10 new issues

Category Results
Security 3 critical
7 high

View in Codacy

🟢 Metrics 154 complexity

Metric Results
Complexity 154

View in Codacy

TIP This summary will be updated as you push new changes.

Fluf22 added 4 commits May 1, 2026 09:04
Rewrite array variant resolution for oneOf types: handle multiple array variants
by scoring item models against sample data (required-field + property-counting heuristic).
New methods: findBestArrayVariant(), scoreOneOfModelMatch(), scoreDirectModelMatch().
@Fluf22 Fluf22 force-pushed the fix/generators branch from f028798 to ff5bdf8 Compare May 1, 2026 07:05
@Fluf22 Fluf22 changed the title fix(generators): oneOf resolution, array variant scoring, and PHP cleanup feat(clients): Agent Studio initial version May 1, 2026
@Fluf22 Fluf22 changed the title feat(clients): Agent Studio initial version feat(clients): Agent Studio v1 May 1, 2026
Fluf22 added 7 commits May 1, 2026 20:13
- Replace agent-studio specs from latest upstream export
- Add x-acl to secret-keys endpoints
- Add x-timeouts and customRequest path to spec.yml
- Remove format annotations (date, uuid, uri, date-time)
- Fix FacetFilters-OutputUnion circular self-reference
- Rename getConfiguration operationId to avoid Go conflict
- Add ErrorBase schema reference for Go client compatibility
- Add x-enum-varnames for VoteEnum (integer 0/1 → downvote/upvote)
- Add modelNameMapping for Python ValidationError/pydantic conflict
- Fix wrapcheck lint exclusion for Go ChunkedPush calls
- Clean up Go search_helpers template nolint directives
- Remove region param from Go and Python playgrounds
- Fix .java-version suffix (21.0.11 without +10)
- Replace untyped items: {} with self-references in filter union specs
- Simplify toolApprovals to avoid unserializable Any in Kotlin
- Remove uniqueItems from FacetFilters-Input (Set vs ArrayList mismatch)
- Add CTS tests for all new agent-studio operationIds
- Rename updateConfiguration CTS to updateApplicationConfiguration
Fluf22 added 30 commits May 6, 2026 08:18
Instead of hardcoding /agent-studio in CTS JSON paths, the test templates
now prepend {{{serverPathSuffix}}} to path assertions. This handles both
common tests (shared across clients) and agent-studio-specific tests.
The path suffix (e.g. /agent-studio) was in host URLs, but echo interceptors
capture paths differently across languages. Moving it to the operation path
in API templates ensures consistent behavior: all languages see the full
path including the suffix, and test assertions match uniformly.
Adds middleware that strips known path prefixes (e.g. /agent-studio) from
incoming requests so mock servers handle prefixed paths transparently.
…ClientCodegen for empty models, revert data class workaround
…tCodegen (vars, requiredVars, optionalVars, etc.)
…allback in Kotlin/Scala

- Add unknown parameter detection in ParametersWithDataType using count
  comparison (single-pass happy path, error-path only iterates on mismatch)
- Make Kotlin discriminator deserialization fall through to type matching
  on unknown values instead of throwing
- Make Scala discriminator deserialization fall through via Option/getOrElse,
  removing the previous dead code (duplicate case with identical guard)
Replace fragile positional List<List<CodegenProperty>> indexing with a
named SavedVarLists record, eliminating silent misassignment risk if
fields are reordered or extended.
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.

3 participants