Skip to content

feat(clients): Agent Studio v1#6097

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

feat(clients): Agent Studio v1#6097
Fluf22 wants to merge 104 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 db46ed933fa544c1b6e75fb4a7652d3780725ae4
🍃 Generated commit 7629916bb95aaf777cdf3abf2e6e7bfd0f4bbbf4
🌲 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 2331
go 1902
php 1836
python 1422
csharp 1371
java 1152
ruby 924
swift 567
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 4 critical · 10 high

Alerts:

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

Results:
14 new issues

Category Results
Security 4 critical
10 high

View in Codacy

🟢 Metrics 190 complexity

Metric Results
Complexity 190

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 Fluf22 force-pushed the fix/generators branch 2 times, most recently from 56c470b to eb175d2 Compare May 27, 2026 09:13
- Add agent_studio_helpers.mustache for all languages with agent-studio
- Wire {{#isAgentStudioClient}} blocks in all api.mustache templates
- Add manual tests for all languages with agent-studio configured
- Add generation.config.mjs protection for C#, JS __tests__, Scala manual dir
- Fix: move Go WithExpiresIn outside {{#isSearchClient}} block
- Fix: remove Dart agent-studio (not configured for Dart)
Fluf22 added 7 commits May 27, 2026 14:14
- Add agent-studio to Dart client config
- Add Timeouts.enrichBundle call to AlgoliaDartGenerator (was missing)
- Hardcode spec timeouts in RetryStrategy.create (api.mustache)
- Add agent-studio deps to pubspec test templates
- Fix integer enum deserialization in param_value.mustache
- Handle nullable String in empty() (nullable.dart)
- Catch ArgumentError in expectError (expect.dart)
- Add empty extension.dart for agent-studio package
Replace JVM-only java.util.Base64/javax.crypto/Charsets with:
- kotlin.io.encoding.Base64.UrlSafe (multiplatform)
- encodeKeySHA256 expect/actual (JVM + native via CommonCrypto)
- kotlinx.datetime.Clock.System (multiplatform)
- String.encodeToByteArray() (multiplatform)
- Replace ExperimentalEncodingApi with io.ktor.util.encodeBase64 (already used in SearchClient)
- Restore KDoc on forgeSecuredUserToken
Kotlin: add global optIn for ExperimentalEncodingApi in build.gradle.kts,
  remove per-site @OptIn annotations from template and test
Swift: replace CryptoKit with String.hmac256(withKey:) from AlgoliaCore
  (cross-platform via CommonCrypto/Crypto), remove CryptoKit import
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