@cartanova/qgrid-cli 2.10.0 → 2.10.2

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.
Files changed (77) hide show
  1. package/README.ko.md +1 -1
  2. package/README.md +1 -1
  3. package/bundle/dist/application/qgrid/conv-routing.js +4 -14
  4. package/bundle/dist/application/qgrid/qgrid.dispatcher.js +10 -5
  5. package/bundle/dist/application/request-log/request-log.model.js +14 -12
  6. package/bundle/dist/application/request-log-step/request-log-step.model.js +7 -11
  7. package/bundle/dist/application/setting/setting.model.js +13 -27
  8. package/bundle/dist/application/token/token.model.js +52 -47
  9. package/bundle/dist/server-error-handler.js +1 -1
  10. package/bundle/dist/sonamu.config.js +3 -15
  11. package/bundle/dist/utils/providers/anthropic/anthropic-constants.js +4 -2
  12. package/bundle/dist/utils/providers/common/model-cost.js +10 -3
  13. package/bundle/src/application/qgrid/conv-routing.test.ts +0 -32
  14. package/bundle/src/application/qgrid/conv-routing.ts +7 -26
  15. package/bundle/src/application/qgrid/qgrid.dispatcher.test.ts +65 -121
  16. package/bundle/src/application/qgrid/qgrid.dispatcher.ts +12 -6
  17. package/bundle/src/application/qgrid/qgrid.frame.test.ts +10 -24
  18. package/bundle/src/application/request-log/request-log.model.test.ts +37 -2
  19. package/bundle/src/application/request-log/request-log.model.ts +14 -7
  20. package/bundle/src/application/request-log-step/request-log-step.model.ts +3 -15
  21. package/bundle/src/application/setting/setting.constant.test.ts +1 -13
  22. package/bundle/src/application/setting/setting.model.ts +10 -26
  23. package/bundle/src/application/setting/setting.persistence.test.ts +27 -0
  24. package/bundle/src/application/token/token.model.test.ts +86 -19
  25. package/bundle/src/application/token/token.model.ts +59 -44
  26. package/bundle/src/server-error-handler.ts +1 -2
  27. package/bundle/src/sonamu.config.ts +4 -31
  28. package/bundle/src/utils/providers/anthropic/anthropic-constants.test.ts +6 -1
  29. package/bundle/src/utils/providers/anthropic/anthropic-constants.ts +5 -2
  30. package/bundle/src/utils/providers/anthropic/anthropic-dispatcher.test.ts +1 -26
  31. package/bundle/src/utils/providers/common/model-cost.test.ts +22 -1
  32. package/bundle/src/utils/providers/common/model-cost.ts +22 -5
  33. package/bundle/src/utils/providers/common/provider-dispatcher.ts +4 -11
  34. package/bundle/web-dist/client/assets/index-DtRTSTes.js +106 -0
  35. package/bundle/web-dist/client/assets/logs-BhVYDEzC.js +1 -0
  36. package/bundle/web-dist/client/assets/monit-BxN4JWqK.js +1 -0
  37. package/bundle/web-dist/client/assets/refresh-cw-NNcU0Cmq.js +1 -0
  38. package/bundle/web-dist/client/assets/{routes-C8Y6olae.js → routes-CBCqRp2o.js} +1 -1
  39. package/bundle/web-dist/client/assets/services.generated-Cbvg2sGQ.js +51 -0
  40. package/bundle/web-dist/client/assets/{settings-CdVqtDQ5.js → settings-hBTEC7Ki.js} +1 -1
  41. package/bundle/web-dist/client/assets/show-BzYft5N4.js +2 -0
  42. package/bundle/web-dist/client/assets/{tokens-CxXtdk9o.js → tokens-PMybtI8X.js} +1 -1
  43. package/bundle/web-dist/client/assets/use-oauth-login-flow-C51_d6-6.js +1 -0
  44. package/bundle/web-dist/client/assets/{use-update-token-mutation-Dkv_HG-C.js → use-update-token-mutation-D-Y8OySK.js} +1 -1
  45. package/bundle/web-dist/client/index.html +2 -2
  46. package/bundle/web-dist/server/assets/{lazyRouteComponent-DyizoQKi.js → lazyRouteComponent-Bj1cPq6x.js} +2 -2
  47. package/bundle/web-dist/server/assets/{logs-DO8zBdBR.js → logs-BSk9lOHe.js} +31 -13
  48. package/bundle/web-dist/server/assets/{monit-COH4MckI.js → monit-D9W4ioUi.js} +5 -24
  49. package/bundle/web-dist/server/assets/{plus-C1D8z9o0.js → plus-CmvbWuDf.js} +1 -1
  50. package/bundle/web-dist/server/assets/{react-dom-PfWvArTX.js → react-dom-BjR1Iaz8.js} +1 -1
  51. package/bundle/web-dist/server/assets/refresh-cw-B8U9BL9-.js +23 -0
  52. package/bundle/web-dist/server/assets/{routes-Btja-741.js → routes-C7lB2Q85.js} +5 -5
  53. package/bundle/web-dist/server/assets/{services.generated-BsKOUSXl.js → services.generated-BM4X3Ecj.js} +102 -6
  54. package/bundle/web-dist/server/assets/{settings-DPcWGvy-.js → settings-BFVuldch.js} +4 -4
  55. package/bundle/web-dist/server/assets/{show-CMXbb3TJ.js → show-Cswh_tqs.js} +10 -9
  56. package/bundle/web-dist/server/assets/{tokens-DAUmTrgO.js → tokens-DiTUwUwr.js} +5 -5
  57. package/bundle/web-dist/server/assets/{use-oauth-login-flow-GsGwqefs.js → use-oauth-login-flow-DYKnG4A2.js} +32 -15
  58. package/bundle/web-dist/server/assets/{use-update-token-mutation-RujWERvj.js → use-update-token-mutation-DqGMopII.js} +1 -1
  59. package/bundle/web-dist/server/entry-server.generated.js +381 -22
  60. package/package.json +1 -1
  61. package/skills/qgrid/references/ai-sdk-provider-contract.md +4 -2
  62. package/skills/qgrid/references/anthropic-claude-code-runtime.md +3 -2
  63. package/skills/qgrid/references/request-log-run-lifecycle.md +2 -0
  64. package/skills/qgrid/references/sonamu-api-web-flow.md +3 -1
  65. package/skills/qgrid/references/token-auth-quota-lifecycle.md +2 -0
  66. package/skills/qgrid/references/verification-and-debugging.md +24 -13
  67. package/bundle/dist/utils/providers/common/token-picker.js +0 -14
  68. package/bundle/src/utils/providers/common/token-picker.ts +0 -18
  69. package/bundle/web-dist/client/assets/index-BfwrIBHs.js +0 -106
  70. package/bundle/web-dist/client/assets/logs-Brit-LqB.js +0 -1
  71. package/bundle/web-dist/client/assets/monit-DrYZkisv.js +0 -1
  72. package/bundle/web-dist/client/assets/services.generated-Bg2XkD-D.js +0 -51
  73. package/bundle/web-dist/client/assets/show-2B2X9MkO.js +0 -2
  74. package/bundle/web-dist/client/assets/use-oauth-login-flow-B9EqnwY9.js +0 -1
  75. /package/bundle/web-dist/client/assets/{plus-CknMNCP5.js → plus-B62CuqT8.js} +0 -0
  76. /package/bundle/web-dist/client/assets/{request-model-eygfdRv7.js → request-model-D4CZPmnG.js} +0 -0
  77. /package/bundle/web-dist/server/assets/{request-model-DXclJfdP.js → request-model-CnCeaNLE.js} +0 -0
@@ -1,6 +1,6 @@
1
- import { A as hashQueryKeyByOptions, B as __exportAll, C as Mutation, D as notifyManager, E as onlineManager, F as resolveStaleTime, H as __toESM, I as skipToken, L as focusManager, M as matchQuery, N as noop$1, O as functionalUpdate, P as partialMatchKey, R as Subscribable, S as require_react, T as Query, V as __require, d as setLocale, f as _enum, h as string$2, j as matchMutation, k as hashKey, l as SD, m as object, n as QgridService, o as TokenService, p as number$1, s as fetch$1, u as SUPPORTED_LOCALES, w as infiniteQueryBehavior, x as require_jsx_runtime, y as QueryClientProvider, z as __commonJSMin } from "./assets/services.generated-BsKOUSXl.js";
2
- import { A as decodePath, C as findRouteMatch, D as createLRUCache, E as processRouteTree, F as last, I as replaceEqualDeep, M as findLast, N as functionalUpdate$1, O as invariant, P as isPromise, S as findFlatMatch, T as processRouteMasks, _ as interpolatePath, a as Link$1, b as trimPath, c as usePrevious$1, d as useRouter, f as getRouterContext, g as cleanPath, h as isNotFound, i as createRootRouteWithContext, j as deepEqual$2, k as createControlledPromise, l as matchContext, m as rootRouteId, n as createFileRoute, p as warning, r as createLazyFileRoute, s as useLayoutEffect$3, t as lazyRouteComponent, u as useRouterState, v as joinPaths, w as findSingleMatch, x as trimPathRight, y as resolvePath } from "./assets/lazyRouteComponent-DyizoQKi.js";
3
- import { n as require_shim, t as require_react_dom } from "./assets/react-dom-PfWvArTX.js";
1
+ import { A as require_jsx_runtime, B as matchMutation, C as union, F as onlineManager, G as skipToken, H as noop$1, I as notifyManager, J as __commonJSMin, K as focusManager, L as functionalUpdate, M as Mutation, N as infiniteQueryBehavior, O as QueryClientProvider, P as Query, R as hashKey, S as string$2, U as partialMatchKey, V as matchQuery, W as resolveStaleTime, X as __require, Y as __exportAll, Z as __toESM, _ as custom, b as number$1, c as fetch$1, d as SD, f as SUPPORTED_LOCALES, g as boolean$1, h as array, j as require_react, m as _enum, n as QgridService, o as TokenService, p as setLocale, q as Subscribable, s as SonamuQueryMode, u as zArrayable, v as date, w as unknown, x as object, y as int, z as hashQueryKeyByOptions } from "./assets/services.generated-BM4X3Ecj.js";
2
+ import { A as decodePath, C as findRouteMatch, D as createLRUCache, E as processRouteTree, F as last, I as replaceEqualDeep, M as findLast, N as functionalUpdate$1, O as invariant, P as isPromise, S as findFlatMatch, T as processRouteMasks, _ as interpolatePath, a as Link$1, b as trimPath, c as usePrevious$1, d as useRouter, f as getRouterContext, g as cleanPath, h as isNotFound, i as createRootRouteWithContext, j as deepEqual$2, k as createControlledPromise, l as matchContext, m as rootRouteId, n as createFileRoute, p as warning, r as createLazyFileRoute, s as useLayoutEffect$3, t as lazyRouteComponent, u as useRouterState, v as joinPaths, w as findSingleMatch, x as trimPathRight, y as resolvePath } from "./assets/lazyRouteComponent-Bj1cPq6x.js";
3
+ import { n as require_shim, t as require_react_dom } from "./assets/react-dom-BjR1Iaz8.js";
4
4
  import minpath from "node:path";
5
5
  import minproc from "node:process";
6
6
  import { fileURLToPath as urlToPath } from "node:url";
@@ -46269,12 +46269,12 @@ var MODEL_PRESET_GROUPS = [{
46269
46269
  "anthropic/claude-opus-5",
46270
46270
  "anthropic/claude-sonnet-5-5",
46271
46271
  "anthropic/claude-sonnet-5",
46272
+ "anthropic/claude-haiku-5-5",
46272
46273
  "anthropic/claude-opus-4-8",
46273
46274
  "anthropic/claude-opus-4-7",
46274
46275
  "anthropic/claude-opus-4-6",
46275
46276
  "anthropic/claude-opus-4-5",
46276
46277
  "anthropic/claude-sonnet-4-6",
46277
- "anthropic/claude-sonnet-4-5",
46278
46278
  "anthropic/claude-haiku-4-5"
46279
46279
  ]
46280
46280
  }];
@@ -46393,7 +46393,7 @@ function ChatWidget() {
46393
46393
  tokenName: data.tokenName,
46394
46394
  durationMs: data.durationMs,
46395
46395
  costUsd: data.costUsd,
46396
- requestLogId: data.runContext?.requestLogId,
46396
+ requestLogId: data.requestLogId,
46397
46397
  fallback: (data.modelFallbacks?.length ?? 0) > 0
46398
46398
  }
46399
46399
  }));
@@ -46492,7 +46492,7 @@ function ChatWidget() {
46492
46492
  tokenName: result.tokenName,
46493
46493
  durationMs: result.durationMs,
46494
46494
  costUsd: result.costUsd,
46495
- requestLogId: result.runContext?.requestLogId,
46495
+ requestLogId: result.requestLogId,
46496
46496
  fallback: (result.modelFallbacks?.length ?? 0) > 0
46497
46497
  }
46498
46498
  }));
@@ -46874,7 +46874,7 @@ function ChatWidget() {
46874
46874
  }
46875
46875
  //#endregion
46876
46876
  //#region src/components/Sidebar.tsx
46877
- var qgridVersion = "2.10.0";
46877
+ var qgridVersion = "2.10.2";
46878
46878
  function Sidebar({ className }) {
46879
46879
  const pathname = useRouterState({ select: (s) => s.location.pathname });
46880
46880
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("aside", {
@@ -68697,15 +68697,9 @@ var Lo = import_react.forwardRef(({ className: t, children: n, variant: r, size:
68697
68697
  Lo.displayName = Item2.displayName;
68698
68698
  //#endregion
68699
68699
  //#region src/contexts/sonamu-provider.tsx
68700
- var uploader = async (files) => {
68701
- if (files.length === 0) return [];
68702
- console.log("File upload not implemented yet");
68703
- return [];
68704
- };
68705
68700
  var sd = (key) => SD(key);
68706
68701
  function SonamuProvider({ children }) {
68707
68702
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(qt, {
68708
- uploader,
68709
68703
  SD: sd,
68710
68704
  children
68711
68705
  });
@@ -68758,15 +68752,15 @@ function RootComponent() {
68758
68752
  }
68759
68753
  //#endregion
68760
68754
  //#region src/routes/tokens.tsx
68761
- var $$splitComponentImporter$5 = () => import("./assets/tokens-DAUmTrgO.js");
68755
+ var $$splitComponentImporter$5 = () => import("./assets/tokens-DiTUwUwr.js");
68762
68756
  var Route$5 = createFileRoute("/tokens")({ component: lazyRouteComponent($$splitComponentImporter$5, "component") });
68763
68757
  //#endregion
68764
68758
  //#region src/routes/settings.tsx
68765
- var $$splitComponentImporter$4 = () => import("./assets/settings-DPcWGvy-.js");
68759
+ var $$splitComponentImporter$4 = () => import("./assets/settings-BFVuldch.js");
68766
68760
  var Route$4 = createFileRoute("/settings")({ component: lazyRouteComponent($$splitComponentImporter$4, "component") });
68767
68761
  //#endregion
68768
68762
  //#region src/routes/monit.tsx
68769
- var $$splitComponentImporter$3 = () => import("./assets/monit-COH4MckI.js");
68763
+ var $$splitComponentImporter$3 = () => import("./assets/monit-D9W4ioUi.js");
68770
68764
  var monitSearchSchema = object({ level: _enum([
68771
68765
  "all",
68772
68766
  "warn",
@@ -68777,14 +68771,379 @@ var Route$3 = createFileRoute("/monit")({
68777
68771
  component: lazyRouteComponent($$splitComponentImporter$3, "component")
68778
68772
  });
68779
68773
  //#endregion
68774
+ //#region src/services/sonamu.generated.ts
68775
+ /**
68776
+ * @generated
68777
+ * API에서 동기화된 파일입니다. 직접 수정하지 마세요.
68778
+ */
68779
+ var HistoryItems = array(object({
68780
+ type: string$2(),
68781
+ role: string$2().optional(),
68782
+ content: unknown().optional(),
68783
+ name: string$2().optional(),
68784
+ arguments: string$2().optional(),
68785
+ call_id: string$2().optional(),
68786
+ output: string$2().optional()
68787
+ }));
68788
+ var TokenCredentials = union([object({
68789
+ accessToken: string$2(),
68790
+ refreshToken: string$2(),
68791
+ expiresAt: number$1(),
68792
+ accountUuid: string$2()
68793
+ }), object({
68794
+ accessToken: string$2(),
68795
+ refreshToken: string$2(),
68796
+ idToken: string$2().optional(),
68797
+ accessTokenExpiresAt: number$1(),
68798
+ idTokenExpiresAt: number$1().optional(),
68799
+ accountId: string$2(),
68800
+ planType: string$2().optional()
68801
+ })]);
68802
+ var ToolDefinitions = array(object({
68803
+ name: string$2(),
68804
+ description: string$2().optional(),
68805
+ inputSchema: unknown()
68806
+ }));
68807
+ var RequestLogOrderBy = _enum([
68808
+ "id-desc",
68809
+ "id-asc",
68810
+ "created_at-desc",
68811
+ "created_at-asc",
68812
+ "ttft_ms-desc",
68813
+ "ttft_ms-asc",
68814
+ "duration_ms-desc",
68815
+ "duration_ms-asc",
68816
+ "input_tokens-desc",
68817
+ "input_tokens-asc",
68818
+ "output_tokens-desc",
68819
+ "output_tokens-asc",
68820
+ "cache_read_tokens-desc",
68821
+ "cache_read_tokens-asc",
68822
+ "cache_creation_tokens-desc",
68823
+ "cache_creation_tokens-asc",
68824
+ "cost_usd-desc",
68825
+ "cost_usd-asc"
68826
+ ]).describe("RequestLogOrderBy");
68827
+ var RequestLogSearchField = _enum([
68828
+ "id",
68829
+ "token_name",
68830
+ "user_prompt"
68831
+ ]).describe("RequestLogSearchField");
68832
+ var RequestLogStatus = _enum([
68833
+ "running",
68834
+ "succeeded",
68835
+ "error",
68836
+ "aborted"
68837
+ ]).describe("RequestLogStatus");
68838
+ var RequestLogStepType = _enum(["generate", "tool_call"]).describe("RequestLogStepType");
68839
+ var RequestLogStepOrderBy = _enum(["id-asc"]).describe("RequestLogStepOrderBy");
68840
+ var RequestLogStepSearchField = _enum(["id"]).describe("RequestLogStepSearchField");
68841
+ var SettingOrderBy = _enum(["key-asc"]).describe("SettingOrderBy");
68842
+ var SettingSearchField = _enum(["key"]).describe("SettingSearchField");
68843
+ var TokenOrderBy = _enum(["id-desc", "ord-asc"]).describe("TokenOrderBy");
68844
+ var TokenSearchField = _enum(["id", "name"]).describe("TokenSearchField");
68845
+ object({
68846
+ id: int(),
68847
+ created_at: date(),
68848
+ token_name: string$2().max(100).nullable(),
68849
+ project_name: string$2().max(50).nullable(),
68850
+ model_name: string$2().max(255).nullable(),
68851
+ requested_model_name: string$2().max(255).nullable(),
68852
+ fallback_count: int().nullable(),
68853
+ user_prompt: string$2().nullable(),
68854
+ system_prompt: string$2().nullable(),
68855
+ response: string$2(),
68856
+ input_tokens: int(),
68857
+ output_tokens: int(),
68858
+ cache_read_tokens: int(),
68859
+ cache_creation_tokens: int(),
68860
+ cache_creation_5m_tokens: int().nullable(),
68861
+ cache_creation_1h_tokens: int().nullable(),
68862
+ duration_ms: int(),
68863
+ ttft_ms: int(),
68864
+ cost_usd: int().nullable(),
68865
+ cost_source: string$2().max(20).nullable(),
68866
+ image_cost_usd: int().nullable(),
68867
+ image_cost_method: string$2().max(100).nullable(),
68868
+ effort: string$2().max(10).nullable(),
68869
+ history: HistoryItems.nullable(),
68870
+ tools: ToolDefinitions.nullable(),
68871
+ json_schema: string$2().nullable(),
68872
+ status: RequestLogStatus,
68873
+ error_message: string$2().nullable(),
68874
+ response_json_ok: boolean$1().nullable(),
68875
+ tool_call_count: int(),
68876
+ is_image_generation: boolean$1(),
68877
+ is_structured: boolean$1()
68878
+ });
68879
+ object({
68880
+ id: int(),
68881
+ created_at: date(),
68882
+ request_log_id: int(),
68883
+ step_index: int(),
68884
+ type: RequestLogStepType,
68885
+ model_name: string$2().max(255).nullable(),
68886
+ requested_model_name: string$2().max(255).nullable(),
68887
+ fallback_count: int().nullable(),
68888
+ input_tokens: int().nullable(),
68889
+ output_tokens: int().nullable(),
68890
+ cache_read_tokens: int().nullable(),
68891
+ cache_creation_tokens: int().nullable(),
68892
+ cache_creation_5m_tokens: int().nullable(),
68893
+ cache_creation_1h_tokens: int().nullable(),
68894
+ cost_usd: int().nullable(),
68895
+ cost_source: string$2().max(20).nullable(),
68896
+ duration_ms: int().nullable(),
68897
+ ttft_ms: int().nullable(),
68898
+ finish_reason: string$2().max(20).nullable(),
68899
+ reasoning_text: string$2().nullable(),
68900
+ reasoning_tokens: int().nullable(),
68901
+ tool_call_index: int().nullable(),
68902
+ tool_call_id: string$2().max(100).nullable(),
68903
+ tool_name: string$2().max(100).nullable(),
68904
+ tool_args: string$2().nullable(),
68905
+ tool_result: string$2().nullable(),
68906
+ tool_duration_ms: int().nullable(),
68907
+ error: string$2().nullable()
68908
+ });
68909
+ object({
68910
+ id: int(),
68911
+ created_at: date(),
68912
+ key: string$2().max(100),
68913
+ value: string$2(),
68914
+ updated_at: date().nullable()
68915
+ });
68916
+ object({
68917
+ id: int(),
68918
+ created_at: date(),
68919
+ provider: string$2().max(20),
68920
+ credentials: TokenCredentials,
68921
+ name: string$2(),
68922
+ active: boolean$1(),
68923
+ reauth_required: boolean$1(),
68924
+ ord: int(),
68925
+ quota_threshold: int().nullable(),
68926
+ weight: int(),
68927
+ keepalive_enabled: boolean$1()
68928
+ });
68929
+ var RequestLogBaseListParams = object({
68930
+ num: number$1().int().nonnegative(),
68931
+ page: number$1().int().min(1),
68932
+ search: RequestLogSearchField,
68933
+ keyword: string$2(),
68934
+ orderBy: RequestLogOrderBy,
68935
+ queryMode: SonamuQueryMode,
68936
+ id: zArrayable(number$1().int().positive()),
68937
+ sonamuFilter: custom(),
68938
+ token_name: string$2().max(100).nullable(),
68939
+ project_name: string$2().max(50).nullable(),
68940
+ model_name: string$2().max(255).nullable()
68941
+ }).partial();
68942
+ object({
68943
+ num: number$1().int().nonnegative(),
68944
+ page: number$1().int().min(1),
68945
+ search: RequestLogStepSearchField,
68946
+ keyword: string$2(),
68947
+ orderBy: RequestLogStepOrderBy,
68948
+ queryMode: SonamuQueryMode,
68949
+ id: zArrayable(number$1().int().positive()),
68950
+ sonamuFilter: custom(),
68951
+ request_log_id: int()
68952
+ }).partial();
68953
+ object({
68954
+ num: number$1().int().nonnegative(),
68955
+ page: number$1().int().min(1),
68956
+ search: SettingSearchField,
68957
+ keyword: string$2(),
68958
+ orderBy: SettingOrderBy,
68959
+ queryMode: SonamuQueryMode,
68960
+ id: zArrayable(number$1().int().positive()),
68961
+ sonamuFilter: custom(),
68962
+ key: string$2().max(100)
68963
+ }).partial();
68964
+ object({
68965
+ num: number$1().int().nonnegative(),
68966
+ page: number$1().int().min(1),
68967
+ search: TokenSearchField,
68968
+ keyword: string$2(),
68969
+ orderBy: TokenOrderBy,
68970
+ queryMode: SonamuQueryMode,
68971
+ id: zArrayable(number$1().int().positive()),
68972
+ sonamuFilter: custom()
68973
+ }).partial();
68974
+ object({
68975
+ id: int(),
68976
+ created_at: date(),
68977
+ token_name: string$2().max(100).nullable(),
68978
+ project_name: string$2().max(50).nullable(),
68979
+ model_name: string$2().max(255).nullable(),
68980
+ requested_model_name: string$2().max(255).nullable(),
68981
+ fallback_count: int().nullable(),
68982
+ user_prompt: string$2().nullable(),
68983
+ system_prompt: string$2().nullable(),
68984
+ response: string$2(),
68985
+ input_tokens: int(),
68986
+ output_tokens: int(),
68987
+ cache_read_tokens: int(),
68988
+ cache_creation_tokens: int(),
68989
+ cache_creation_5m_tokens: int().nullable(),
68990
+ cache_creation_1h_tokens: int().nullable(),
68991
+ duration_ms: int(),
68992
+ ttft_ms: int(),
68993
+ cost_usd: int().nullable(),
68994
+ cost_source: string$2().max(20).nullable(),
68995
+ image_cost_usd: int().nullable(),
68996
+ image_cost_method: string$2().max(100).nullable(),
68997
+ effort: string$2().max(10).nullable(),
68998
+ history: HistoryItems.nullable(),
68999
+ tools: ToolDefinitions.nullable(),
69000
+ status: RequestLogStatus,
69001
+ response_json_ok: boolean$1().nullable(),
69002
+ error_message: string$2().nullable(),
69003
+ tool_call_count: int(),
69004
+ is_image_generation: boolean$1(),
69005
+ is_structured: boolean$1()
69006
+ });
69007
+ object({
69008
+ id: int(),
69009
+ created_at: date(),
69010
+ token_name: string$2().max(100).nullable(),
69011
+ project_name: string$2().max(50).nullable(),
69012
+ model_name: string$2().max(255).nullable(),
69013
+ requested_model_name: string$2().max(255).nullable(),
69014
+ fallback_count: int().nullable(),
69015
+ input_tokens: int(),
69016
+ output_tokens: int(),
69017
+ cache_read_tokens: int(),
69018
+ cache_creation_tokens: int(),
69019
+ cache_creation_5m_tokens: int().nullable(),
69020
+ cache_creation_1h_tokens: int().nullable(),
69021
+ duration_ms: int(),
69022
+ ttft_ms: int(),
69023
+ cost_usd: int().nullable(),
69024
+ cost_source: string$2().max(20).nullable(),
69025
+ image_cost_usd: int().nullable(),
69026
+ image_cost_method: string$2().max(100).nullable(),
69027
+ effort: string$2().max(10).nullable(),
69028
+ status: RequestLogStatus,
69029
+ response_json_ok: boolean$1().nullable(),
69030
+ tool_call_count: int(),
69031
+ is_image_generation: boolean$1(),
69032
+ is_structured: boolean$1()
69033
+ });
69034
+ object({
69035
+ id: int(),
69036
+ token_name: string$2().max(100).nullable(),
69037
+ model_name: string$2().max(255).nullable(),
69038
+ input_tokens: int(),
69039
+ output_tokens: int(),
69040
+ cache_read_tokens: int(),
69041
+ cache_creation_tokens: int(),
69042
+ cache_creation_5m_tokens: int().nullable(),
69043
+ cache_creation_1h_tokens: int().nullable(),
69044
+ cost_usd: int().nullable(),
69045
+ cost_source: string$2().max(20).nullable()
69046
+ });
69047
+ _enum([
69048
+ "A",
69049
+ "P",
69050
+ "C"
69051
+ ]);
69052
+ object({
69053
+ id: int(),
69054
+ created_at: date(),
69055
+ step_index: int(),
69056
+ type: RequestLogStepType,
69057
+ model_name: string$2().max(255).nullable(),
69058
+ requested_model_name: string$2().max(255).nullable(),
69059
+ fallback_count: int().nullable(),
69060
+ input_tokens: int().nullable(),
69061
+ output_tokens: int().nullable(),
69062
+ cache_read_tokens: int().nullable(),
69063
+ cache_creation_tokens: int().nullable(),
69064
+ cache_creation_5m_tokens: int().nullable(),
69065
+ cache_creation_1h_tokens: int().nullable(),
69066
+ cost_usd: int().nullable(),
69067
+ cost_source: string$2().max(20).nullable(),
69068
+ duration_ms: int().nullable(),
69069
+ ttft_ms: int().nullable(),
69070
+ finish_reason: string$2().max(20).nullable(),
69071
+ reasoning_text: string$2().nullable(),
69072
+ reasoning_tokens: int().nullable(),
69073
+ tool_call_index: int().nullable(),
69074
+ tool_call_id: string$2().max(100).nullable(),
69075
+ tool_name: string$2().max(100).nullable(),
69076
+ tool_args: string$2().nullable(),
69077
+ tool_result: string$2().nullable(),
69078
+ tool_duration_ms: int().nullable(),
69079
+ error: string$2().nullable()
69080
+ });
69081
+ object({
69082
+ id: int(),
69083
+ created_at: date(),
69084
+ step_index: int(),
69085
+ type: RequestLogStepType,
69086
+ model_name: string$2().max(255).nullable(),
69087
+ requested_model_name: string$2().max(255).nullable(),
69088
+ fallback_count: int().nullable(),
69089
+ input_tokens: int().nullable(),
69090
+ output_tokens: int().nullable(),
69091
+ cache_read_tokens: int().nullable(),
69092
+ cache_creation_tokens: int().nullable(),
69093
+ cache_creation_5m_tokens: int().nullable(),
69094
+ cache_creation_1h_tokens: int().nullable(),
69095
+ cost_usd: int().nullable(),
69096
+ cost_source: string$2().max(20).nullable(),
69097
+ duration_ms: int().nullable(),
69098
+ ttft_ms: int().nullable(),
69099
+ finish_reason: string$2().max(20).nullable(),
69100
+ reasoning_tokens: int().nullable(),
69101
+ tool_call_index: int().nullable(),
69102
+ tool_call_id: string$2().max(100).nullable(),
69103
+ tool_name: string$2().max(100).nullable(),
69104
+ tool_duration_ms: int().nullable(),
69105
+ error: string$2().nullable()
69106
+ });
69107
+ object({
69108
+ id: int(),
69109
+ tool_args: string$2().nullable()
69110
+ });
69111
+ _enum([
69112
+ "A",
69113
+ "T",
69114
+ "I"
69115
+ ]);
69116
+ object({
69117
+ id: int(),
69118
+ created_at: date(),
69119
+ key: string$2().max(100),
69120
+ value: string$2(),
69121
+ updated_at: date().nullable()
69122
+ });
69123
+ _enum(["A"]);
69124
+ object({
69125
+ id: int(),
69126
+ created_at: date(),
69127
+ provider: string$2().max(20),
69128
+ credentials: TokenCredentials,
69129
+ name: string$2(),
69130
+ active: boolean$1(),
69131
+ reauth_required: boolean$1(),
69132
+ ord: int(),
69133
+ quota_threshold: int().nullable(),
69134
+ weight: int(),
69135
+ keepalive_enabled: boolean$1()
69136
+ });
69137
+ _enum(["A"]);
69138
+ //#endregion
68780
69139
  //#region src/routes/logs.tsx
68781
- var $$splitComponentImporter$2 = () => import("./assets/logs-DO8zBdBR.js");
69140
+ var $$splitComponentImporter$2 = () => import("./assets/logs-BSk9lOHe.js");
68782
69141
  var logsSearchSchema = object({
68783
69142
  token: string$2().optional(),
68784
69143
  project: string$2().optional(),
68785
69144
  model: string$2().optional(),
68786
- sort: string$2().optional(),
68787
- page: number$1().optional().default(1)
69145
+ sort: RequestLogOrderBy.optional(),
69146
+ page: RequestLogBaseListParams.shape.page.default(1)
68788
69147
  });
68789
69148
  var Route$2 = createFileRoute("/logs")({
68790
69149
  validateSearch: logsSearchSchema,
@@ -68792,11 +69151,11 @@ var Route$2 = createFileRoute("/logs")({
68792
69151
  });
68793
69152
  //#endregion
68794
69153
  //#region src/routes/index.tsx
68795
- var $$splitComponentImporter$1 = () => import("./assets/routes-Btja-741.js");
69154
+ var $$splitComponentImporter$1 = () => import("./assets/routes-C7lB2Q85.js");
68796
69155
  var Route$1 = createFileRoute("/")({ component: lazyRouteComponent($$splitComponentImporter$1, "component") });
68797
69156
  //#endregion
68798
69157
  //#region src/routes/requests/show.tsx
68799
- var $$splitComponentImporter = () => import("./assets/show-CMXbb3TJ.js");
69158
+ var $$splitComponentImporter = () => import("./assets/show-Cswh_tqs.js");
68800
69159
  var showSearchSchema = object({ id: number$1() });
68801
69160
  var Route = createFileRoute("/requests/show")({
68802
69161
  validateSearch: showSearchSchema,
@@ -68871,4 +69230,4 @@ async function render(url, preloadedData = []) {
68871
69230
  };
68872
69231
  }
68873
69232
  //#endregion
68874
- export { clsx as a, remarkGfm as c, Q as i, Markdown as l, Route$2 as n, lucideX as o, Route$3 as r, render, lucideRotateCcw as s, Route as t, lucideKeyRound as u };
69233
+ export { Route$3 as a, lucideX as c, Markdown as d, lucideKeyRound as f, RequestLogOrderBy as i, lucideRotateCcw as l, Route$2 as n, Q as o, RequestLogBaseListParams as r, render, clsx as s, Route as t, remarkGfm as u };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cartanova/qgrid-cli",
3
- "version": "2.10.0",
3
+ "version": "2.10.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/cartanova-ai/qgrid"
@@ -68,7 +68,7 @@ Do not write `providerOptions: { ... } satisfies QgridProviderOptions`: the expo
68
68
  - `reasoningSummary`: OpenAI/Codex route only.
69
69
  - `serviceTier`: OpenAI/Codex route only.
70
70
  - `timeoutMs`: Anthropic server-side Claude Code process timeout in milliseconds. It must be a positive integer no greater than 30 minutes and defaults to 240 seconds. For non-stream `generateText`, the SDK derives request-scoped Undici `headersTimeout` and `bodyTimeout` values as `timeoutMs + 60_000` without changing the process-global dispatcher.
71
- - `fallbackModels`: reserved for future qgrid server-side fallback routing. It is not the Fable 5 safety-refusal fallback, which is owned by Claude Code upstream.
71
+ - `fallbackModels`: deprecated, ignored compatibility field. The provider emits a standard unsupported-option warning when supplied; remove it from callers. It is not Claude Code's upstream Fable safety-refusal fallback.
72
72
  - `imageGeneration`: OpenAI/Codex non-stream only. Enables Codex's built-in `image_generation` tool for that request.
73
73
  - `imageGenerationOptions`: optional `quality: "low" | "medium" | "high"`, `size: "1024x1024" | "1024x1536" | "1536x1024"`, and `background: "auto" | "opaque" | "transparent"`. Transparent requests use Codex standalone Images with `gpt-image-2`; other requests use the hosted Responses tool. Transparent mode rejects tools/structured output, supports up to five references, validates real transparent and visible PNG pixels, and never invokes background-removal fallback. Returned size/quality may differ from requested settings; read `result.providerMetadata.qgrid.imageGeneration` or per-file `result.content` metadata. `result.files[]` contains bytes/mediaType only. Logs separate `requestedOptions` from `observedGeneration`; image usage is separate from the zero text-driver usage on this route.
74
74
 
@@ -199,6 +199,8 @@ Reference images for image generation use normal AI SDK multimodal message parts
199
199
 
200
200
  ## Response mapping
201
201
 
202
+ Cancelling the returned provider stream aborts its HTTP request and releases the SSE reader; caller abort signals propagate through the same request-local cancellation path. Normal completion and error events also release the reader. OpenAI affinity coordinates are swept for expiration on insertion and bounded to the most recently issued 1,000 entries; eviction keeps full-history generation functional.
203
+
202
204
  Since 2.10.0, `generateText` exposes the parent request-log ID at `result.providerMetadata?.qgrid?.requestLogId`. For `streamText`, consume the stream first, then read `(await result.providerMetadata)?.qgrid?.requestLogId`. The raw query response and stream `done` event carry optional top-level `requestLogId`.
203
205
 
204
206
  Update both server and SDK to use this metadata. The field is omitted when logging is disabled or an older server does not return it. Tool-run steps share the parent ID; `runContext.requestLogId` remains separate continuation state. This does not expose external-provider telemetry logger IDs or add IDs to stream delta/error events.
@@ -226,7 +228,7 @@ For a successful Fable refusal fallback (Fable 5 or 5.1):
226
228
  - `providerMetadata.qgrid.modelFallbacks` preserves the refusal route and optional category/explanation.
227
229
  - `providerMetadata.qgrid.costSource` reports whether cost came from Claude Code or qgrid's pricing table. Prefer the provider-reported combined cost for this path.
228
230
 
229
- Do not expose the requested Fable model as `response.modelId` after Opus served the answer, and do not map this upstream safety behavior onto the reserved `providerOptions.qgrid.fallbackModels` option.
231
+ Do not expose the requested Fable model as `response.modelId` after Opus served the answer, and do not map this upstream safety behavior onto the deprecated `providerOptions.qgrid.fallbackModels` option.
230
232
 
231
233
  Usage maps qgrid standard usage into AI SDK V3 usage:
232
234
 
@@ -77,7 +77,7 @@ claude -p
77
77
  --model <canonical-model-or-1m-suffix>
78
78
  --system-prompt <text> # small system prompt
79
79
  --system-prompt-file <path> # large system prompt
80
- --thinking disabled # omitted for Fable 5/5.1, Opus 5, Opus 5.5 and Sonnet 5.5
80
+ --thinking disabled # omitted for Fable 5/5.1, Opus 5, Opus 5.5, Sonnet 5.5 and Haiku 5.5
81
81
  --effort <effort-or-low>
82
82
  --disable-slash-commands
83
83
  --session-id <uuid>
@@ -97,7 +97,7 @@ Important details:
97
97
  - Large system prompts over 64 KiB are written to a temporary file to avoid argv `E2BIG` — this
98
98
  same branch absorbs large injected schema contracts, so the old 64 KiB schema argv limit no
99
99
  longer applies (only the global 512 KiB caller-schema complexity limit remains).
100
- - `--thinking disabled`, `MAX_THINKING_TOKENS=0`, and adaptive thinking env suppression keep thinking off for existing models. Fable 5, Fable 5.1, Opus 5.5 and Sonnet 5.5 require always-on adaptive thinking (Fable: CLI catalog `rejects_disabled_thinking`; Opus 5.5: official spec, thinking cannot be turned off; Sonnet 5.5: API `{type: "disabled"}` returns 400 and the CLI catalog marks `rejects_disabled_thinking`). Opus 5 defaults to adaptive thinking and rejects disabled thinking at `xhigh`/`max` effort. qgrid omits all three suppressors for these models (`usesAdaptiveThinking`) and uses `effort` to control depth.
100
+ - `--thinking disabled`, `MAX_THINKING_TOKENS=0`, and adaptive thinking env suppression keep thinking off for existing models. Fable 5, Fable 5.1, Opus 5.5, Sonnet 5.5 and Haiku 5.5 require always-on adaptive thinking (Fable: CLI catalog `rejects_disabled_thinking`; Opus 5.5: official spec, thinking cannot be turned off; Sonnet 5.5: API `{type: "disabled"}` returns 400 and the CLI catalog marks `rejects_disabled_thinking`; Haiku 5.5 (released 2026-10-07): the API accepts disabled thinking only at `high` effort or below and returns 400 at `xhigh`/`max`, and the Claude Code 2.1.293 catalog marks `rejects_disabled_thinking`). Opus 5 defaults to adaptive thinking and rejects disabled thinking at `xhigh`/`max` effort. qgrid omits all three suppressors for these models (`usesAdaptiveThinking`) and uses `effort` to control depth.
101
101
 
102
102
  ## Spawn env
103
103
 
@@ -260,6 +260,7 @@ qgrid's exact 1M support set currently includes:
260
260
  - `claude-opus-5-5`
261
261
  - `claude-sonnet-5-5`
262
262
  - `claude-sonnet-5`
263
+ - `claude-haiku-5-5`
263
264
  - `claude-sonnet-4-6`
264
265
  - `claude-opus-4-6`
265
266
  - `claude-opus-4-8`
@@ -63,6 +63,8 @@ Provider-qualified ids widen `model_name` and `requested_model_name` from 50 to
63
63
 
64
64
  ## Usage fields
65
65
 
66
+ The dashboard total includes driver `cost_usd` and `image_cost_usd` once each. Both the stored sum and legacy driver-price adjustment apply the same normalized Sonamu filters as the list. The `/api/qgrid/stats` `requests` field is an in-memory count of completed provider generations since process start, separated by provider and token name; tool follow-up generations count separately. It is not a persisted lifetime count or a count of failed attempts.
67
+
66
68
  Stored request log usage uses qgrid-standard semantics:
67
69
 
68
70
  - `input_tokens`: total input, including cache read/write.
@@ -60,6 +60,8 @@ Image-generation request logs add `is_image_generation`, `image_cost_usd`, and `
60
60
 
61
61
  In 2.9.8, list and detail model labels show requested model to image model for generated-image results, using an image serving model or the model recorded in `image_cost_method`. The cost fallback is an estimate, not an upstream version guarantee. Preserve the actual driver in stored `model_name` for hosted/auto turns. Do not hardcode a display version or render an image-generation/assumption badge. Auto text-only replies are not marked `is_image_generation`.
62
62
 
63
+ The list header ends its filter row with a reload button (2.10.2+) that calls the generated hooks' `refresh()` for the list and the total-cost query with the current filters; it does not refetch the token/project/model filter options, and TanStack Query's `isRefreshing` disables it while a reload is in flight.
64
+
63
65
  Structured output visibility: the list has an `Fmt` column (`json` badge from `is_structured` vs `text`) and a `broken` badge driven by `response_json_ok = false`; there is no broken-JSON list filter. At review time, all 114,647 succeeded structured rows had `response_json_ok = true` and zero false rows existed; the unindexed zero-result lookup scanned 1,286,016 rows and took about 3 seconds. Before reinstating the filter, validate the failure-signal semantics and index the predicate. The detail page shows a dark Response Type panel (zod expression by default, `type` declaration via toggle) rendered server-side from the stored `json_schema`. Plain-text rows render no panel. Rows written by pre-2.7.2 servers show `text`.
64
66
 
65
67
  Tool contract visibility: the detail page renders a Tools panel between Response Type and Steps for requests whose `tools` is non-empty. It starts collapsed and its header shows the tool count plus a responsive, truncated name list built from the detail subset — collapsed views issue no extra query. Expanding fires `toolsView` once and caches it for that request id, since a stored tool contract never changes. Each card shows the name, the full description, the parameter count, and a compact display-only zod shape; enum values past the sixth collapse to `/* +N */`, with the full shape reachable through hover and keyboard focus. All JSON Schema conversion happens server-side — the web renders completed strings and holds no schema logic.
@@ -72,7 +74,7 @@ Clicking an attached or generated image opens a preview with extension, decoded
72
74
 
73
75
  Token credential previews must tolerate missing `accessToken` rather than reading `.length` unconditionally. Legacy system-keychain credentials display `System Keychain`; this display compatibility does not enable an Antigravity runtime.
74
76
 
75
- Chat model presets: the model `<select>` lists the served subset of `QgridSupportedModel` grouped by provider (`MODEL_PRESET_GROUPS` in `ChatWidget.tsx`), newest first, and defaults to `anthropic/claude-fable-5-1`. Ids that the ChatGPT-subscription Codex route no longer serves (`gpt-5.4` and `gpt-5.4-mini` retired 2026-08-31 with `gpt-5.6-terra` / `gpt-5.6-luna` as replacements; `gpt-5.2` and `gpt-5.3-codex` removed earlier), `gpt-5.3-codex-spark` (rejected on the ChatGPT-account Codex route and absent from its catalog as of 2026-09-29), `gpt-5.5` (retires from the Codex/ChatGPT route on 2026-10-14; replacements `gpt-6.1-sol` / `gpt-6-luna`), the retired `claude-opus-4` / `claude-sonnet-4` (2026-06-15) and `claude-opus-4-1` (2026-08-05; Claude Code silently serves `claude-opus-5-5` instead), and the catalog-less `claude-sonnet-4-7` stay in the SDK type and price table (legacy request-log cost) but are excluded here. web does not depend on ai-sdk, so a new model must be added in both places. `openai/gpt-6-astra`, `openai/gpt-6.1-sol`, `openai/gpt-6-sol`, and `openai/gpt-6-luna` are included in the OpenAI group and `anthropic/claude-opus-5-5` and `anthropic/claude-sonnet-5-5` in the Anthropic group; adding them does not change the default model.
77
+ Chat model presets: the model `<select>` lists the served subset of `QgridSupportedModel` grouped by provider (`MODEL_PRESET_GROUPS` in `ChatWidget.tsx`), newest first, and defaults to `anthropic/claude-fable-5-1`. Ids that the ChatGPT-subscription Codex route no longer serves (`gpt-5.4` and `gpt-5.4-mini` retired 2026-08-31 with `gpt-5.6-terra` / `gpt-5.6-luna` as replacements; `gpt-5.2` and `gpt-5.3-codex` removed earlier), `gpt-5.3-codex-spark` (rejected on the ChatGPT-account Codex route and absent from its catalog as of 2026-09-29), `gpt-5.5` (retires from the Codex/ChatGPT route on 2026-10-14; replacements `gpt-6.1-sol` / `gpt-6-luna`), the retired `claude-opus-4` / `claude-sonnet-4` (2026-06-15) and `claude-opus-4-1` (2026-08-05; Claude Code silently serves `claude-opus-5-5` instead), `claude-sonnet-4-5` (deprecated 2026-09-30, retirement 2026-11-30, replacement `claude-sonnet-5-5`), and the catalog-less `claude-sonnet-4-7` stay in the SDK type and price table (legacy request-log cost) but are excluded here. web does not depend on ai-sdk, so a new model must be added in both places. `openai/gpt-6-astra`, `openai/gpt-6.1-sol`, `openai/gpt-6-sol`, and `openai/gpt-6-luna` are included in the OpenAI group and `anthropic/claude-opus-5-5`, `anthropic/claude-sonnet-5-5`, and `anthropic/claude-haiku-5-5` in the Anthropic group; adding them does not change the default model.
76
78
 
77
79
  The monit tab's vitals strip shows per-provider in-flight counts, an in-flight sparkline, token chips with quota gauges (fed by the dispatcher's 60-second rate-limits cache; `resetsAt` arrives as ms epoch), and a 1-hour per-provider request/error/cache-hit stats line polled separately every 30 seconds.
78
80
 
@@ -42,6 +42,8 @@ Use this reference before changing token storage, OAuth flows, token activation,
42
42
  On creation, the database defaults `reauth_required = false`; `TokenModel.save` also applies `quota_threshold = 80` and `weight = 1` independently for any field not provided (skipped entirely when `id` is present).
43
43
  `TokenModel.save` is internal only; callers use the curated qgrid token APIs so they cannot write lifecycle fields directly.
44
44
 
45
+ Account re-login reads, deletes, and replaces matching token rows in one explicit Puri transaction. A failed insert rolls back deletion. The oldest matching row supplies quota threshold (including null), weight, and dashboard order unless the caller explicitly supplies them; keepalive stays enabled if any replaced row enabled it. The new login still receives a new ID and resets active/reauth state. Internal full-pool reads use unlimited list mode rather than a 100-row page.
46
+
45
47
  Dashboard credential previews must tolerate legacy credentials without `accessToken`. System-keychain credentials, including a remaining Antigravity row, display `System Keychain` rather than crashing on `.length`. This 2.9.8 display fix neither deletes legacy rows nor enables Antigravity provider execution.
46
48
 
47
49
  OpenAI credentials: